943,925 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 10048
  • Assembly RSS
You are currently viewing page 1 of this multi-page discussion thread
Mar 29th, 2007
0

Need help with 8086 assembly language

Expand Post »
I am new to Microprocessor 8086. i should submit this assignment by monday evening. Can anybody help me with this question?

Q1 Write an 8086 assembly language program that will compute:

2.0 * log10 X for x = 0.1, 1.0, 10.0, 100.5, 1000.0, and six other values using a loop. All values are in the single-precision (short real) format.


Kindly help me. I am breaking my head like anything
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
zunnur is offline Offline
3 posts
since Mar 2007
Mar 31st, 2007
0

Re: Need help with 8086 assembly language

post the code you are writing. Are you allowed to use the math coprocessor for log and other math functions ?
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Mar 31st, 2007
0

Re: Need help with 8086 assembly language

I would try using the FYL2X instruction, which computes:

st(1) = st(1) * log2(st(0)

Where log2 is logarithm to base 2. You can get from log base 2 to log base 10 with the formula:

log10(x) = log2(x) * log10(2)
Reputation Points: 14
Solved Threads: 4
Junior Poster
mathematician is offline Offline
149 posts
since Nov 2006
Apr 18th, 2007
0

Re: Need help with 8086 assembly language

Hi even im looking out the answer for the same question
in case u know the answer or get it from some one kindly send it to me...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Sangita is offline Offline
2 posts
since Apr 2007
Apr 20th, 2007
0

Re: Need help with 8086 assembly language

.data
short REAL4 0.1,1.0,10.0, 100.5, 1000.0, 400.0, 40.5, 60.6,8.9,10.1
count db 0ah
.code
Lea si, short
Mov cl, count
Loop1:
;moving the element to to ax register
Mov ax, [si]
;Push ax into first position
fld ax
;This instruction is used to find the logarithm of the top most element of the stack
FLDLG2
;Pop the element from the stack
Fstp dl
;displaying the value
Mov ah,02h
Int 21h
Loop Loop1

Mov ah,4ch
Int 21h

If u have any queries, just reply me
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mmahima2002 is offline Offline
3 posts
since Apr 2007
Apr 26th, 2007
0

Re: Need help with 8086 assembly language

Click to Expand / Collapse  Quote originally posted by zunnur ...
I am new to Microprocessor 8086. i should submit this assignment by monday evening. Can anybody help me with this question?

Q1 Write an 8086 assembly language program that will compute:

2.0 * log10 X for x = 0.1, 1.0, 10.0, 100.5, 1000.0, and six other values using a loop. All values are in the single-precision (short real) format.


Kindly help me. I am breaking my head like anything
if u get the answer of this question plz mail me...... <email snipped>
Last edited by Ancient Dragon; Apr 28th, 2007 at 3:23 pm. Reason: snipped email
Reputation Points: 10
Solved Threads: 0
Newbie Poster
aforarihant19 is offline Offline
5 posts
since Apr 2007
Apr 26th, 2007
0

Re: Need help with 8086 assembly language

.data
short REAL4 0.1,1.0,10.0, 100.5, 1000.0, 400.0, 40.5, 60.6,8.9,10.1
count db 0ah
.code
Lea si, short
Mov cl, count
Loop1:
;moving the element to to ax register
Mov ax, [si]
;Push ax into first position
fld ax
;This instruction is used to find the logarithm of the top most element of the stack
FLDLG2
;Pop the element from the stack
Fstp dl
;displaying the value
Mov ah,02h
Int 21h
Loop Loop1

Mov ah,4ch
Int 21h

am new to Microprocessor 8086. i should submit this assignment by monday evening. Can anybody help me with this question?

Q1 Write an 8086 assembly language program that will compute:

2.0 * log10 X for x = 0.1, 1.0, 10.0, 100.5, 1000.0, and six other values using a loop. All values are in the single-precision (short real) format.


Kindly help me. I am breaking my head like anything
if u get the answer of this question plz mail me...... <snipped email>
Last edited by Ancient Dragon; Apr 28th, 2007 at 3:24 pm. Reason: snipped email
Reputation Points: 10
Solved Threads: 0
Newbie Poster
aforarihant19 is offline Offline
5 posts
since Apr 2007
Apr 26th, 2007
0

Re: Need help with 8086 assembly language

Click to Expand / Collapse  Quote originally posted by zunnur ...
I am new to Microprocessor 8086. i should submit this assignment by monday evening. Can anybody help me with this question?

Q1 Write an 8086 assembly language program that will compute:

2.0 * log10 X for x = 0.1, 1.0, 10.0, 100.5, 1000.0, and six other values using a loop. All values are in the single-precision (short real) format.


Kindly help me. I am breaking my head like anything
am new to Microprocessor 8086. i should submit this assignment by monday evening. Can anybody help me with this question?

Q1 Write an 8086 assembly language program that will compute:

2.0 * log10 X for x = 0.1, 1.0, 10.0, 100.5, 1000.0, and six other values using a loop. All values are in the single-precision (short real) format.


Kindly help me. I am breaking my head like anything[/quote]

if u get the answer of this question plz mail me...... <snipped email>
Last edited by Ancient Dragon; Apr 28th, 2007 at 3:24 pm. Reason: snipped email
Reputation Points: 10
Solved Threads: 0
Newbie Poster
aforarihant19 is offline Offline
5 posts
since Apr 2007
Apr 26th, 2007
0

Re: Need help with 8086 assembly language

iam new to Microprocessor 8086. i should submit this assignment by 27th /04/2007i evening. Can anybody help me with this question?

Q1 Write an 8086 assembly language program that will compute:

2.0 * log10 X for x = 0.1, 1.0, 10.0, 100.5, 1000.0, and six other values using a loop. All values are in the single-precision (short real) format.


Kindly help me. I am breaking my head like anything

if u get the answer of this question plz mail me...... <snipped email> it is urgent...............
Last edited by Ancient Dragon; Apr 28th, 2007 at 3:25 pm. Reason: snipped email
Reputation Points: 10
Solved Threads: 0
Newbie Poster
aforarihant19 is offline Offline
5 posts
since Apr 2007
Apr 27th, 2007
0

Re: Need help with 8086 assembly language

.data
short REAL4 0.1,1.0,10.0, 100.5, 1000.0, 400.0, 40.5, 60.6,8.9,10.1

count db 0ah
.code
Lea si, short
Mov cl, count
Loop1:
;moving the element to to ax register
Mov ax, [si]
;Push ax into first position
fld ax
;This instruction is used to find the logarithm of the top most element of the stack
FLDLG2
;Pop the element from the stack
Fstp dl
;displaying the value
Mov ah,02h
Int 21h
Loop Loop1

Mov ah,4ch
Int 21h
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mmahima2002 is offline Offline
3 posts
since Apr 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: fms1234
Next Thread in Assembly Forum Timeline: 56h renaming





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC