Need help with 8086 assembly language

Reply

Join Date: Mar 2007
Posts: 3
Reputation: zunnur is an unknown quantity at this point 
Solved Threads: 0
zunnur zunnur is offline Offline
Newbie Poster

Need help with 8086 assembly language

 
0
  #1
Mar 29th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,407
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1467
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

Re: Need help with 8086 assembly language

 
0
  #2
Mar 31st, 2007
post the code you are writing. Are you allowed to use the math coprocessor for log and other math functions ?
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 134
Reputation: mathematician is an unknown quantity at this point 
Solved Threads: 3
mathematician mathematician is offline Offline
Junior Poster

Re: Need help with 8086 assembly language

 
0
  #3
Mar 31st, 2007
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)
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 2
Reputation: Sangita is an unknown quantity at this point 
Solved Threads: 0
Sangita Sangita is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

 
0
  #4
Apr 18th, 2007
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...
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 3
Reputation: mmahima2002 is an unknown quantity at this point 
Solved Threads: 0
mmahima2002 mmahima2002 is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

 
0
  #5
Apr 20th, 2007
.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
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 5
Reputation: aforarihant19 is an unknown quantity at this point 
Solved Threads: 0
aforarihant19 aforarihant19 is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

 
0
  #6
Apr 26th, 2007
Originally Posted by zunnur View 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
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 5
Reputation: aforarihant19 is an unknown quantity at this point 
Solved Threads: 0
aforarihant19 aforarihant19 is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

 
0
  #7
Apr 26th, 2007
Originally Posted by mmahima2002 View Post
.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
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 5
Reputation: aforarihant19 is an unknown quantity at this point 
Solved Threads: 0
aforarihant19 aforarihant19 is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

 
0
  #8
Apr 26th, 2007
Originally Posted by zunnur View 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
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 5
Reputation: aforarihant19 is an unknown quantity at this point 
Solved Threads: 0
aforarihant19 aforarihant19 is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

 
0
  #9
Apr 26th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 3
Reputation: mmahima2002 is an unknown quantity at this point 
Solved Threads: 0
mmahima2002 mmahima2002 is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

 
0
  #10
Apr 27th, 2007
.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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC