RSS Forums RSS
Please support our Assembly advertiser: Programming Forums
Views: 5857 | Replies: 14
Reply
Join Date: Mar 2007
Posts: 3
Reputation: zunnur is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zunnur zunnur is offline Offline
Newbie Poster

Need help with 8086 assembly language

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,565
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 40
Solved Threads: 977
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: Need help with 8086 assembly language

  #2  
Mar 31st, 2007
post the code you are writing. Are you allowed to use the math coprocessor for log and other math functions ?
<<Freelance Programmer>> << Hobby Site>>
Signature links for sale. PM me for details
Reply With Quote  
Join Date: Nov 2006
Posts: 99
Reputation: mathematician is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
mathematician mathematician is offline Offline
Junior Poster in Training

Re: Need help with 8086 assembly language

  #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  
Join Date: Apr 2007
Posts: 2
Reputation: Sangita is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Sangita Sangita is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

  #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  
Join Date: Apr 2007
Posts: 3
Reputation: mmahima2002 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mmahima2002 mmahima2002 is offline Offline
Newbie Poster

Solution Re: Need help with 8086 assembly language

  #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  
Join Date: Apr 2007
Posts: 5
Reputation: aforarihant19 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
aforarihant19 aforarihant19 is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

  #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  
Join Date: Apr 2007
Posts: 5
Reputation: aforarihant19 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
aforarihant19 aforarihant19 is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

  #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  
Join Date: Apr 2007
Posts: 5
Reputation: aforarihant19 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
aforarihant19 aforarihant19 is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

  #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  
Join Date: Apr 2007
Posts: 5
Reputation: aforarihant19 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
aforarihant19 aforarihant19 is offline Offline
Newbie Poster

Re: Need help with 8086 assembly language

  #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  
Join Date: Apr 2007
Posts: 3
Reputation: mmahima2002 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mmahima2002 mmahima2002 is offline Offline
Newbie Poster

Solution Re: Need help with 8086 assembly language

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 9:25 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC