954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Need help with 8086 assembly language

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

zunnur
Newbie Poster
3 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
 

post the code you are writing. Are you allowed to use the math coprocessor for log and other math functions ?

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

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)

mathematician
Junior Poster
161 posts since Nov 2006
Reputation Points: 14
Solved Threads: 7
 

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...

Sangita
Newbie Poster
2 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

.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

mmahima2002
Newbie Poster
3 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

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......

aforarihant19
Newbie Poster
5 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

.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......

aforarihant19
Newbie Poster
5 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

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......

aforarihant19
Newbie Poster
5 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

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...... it is urgent...............

aforarihant19
Newbie Poster
5 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

.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

mmahima2002
Newbie Poster
3 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 
.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



tanx buddy .... is it the answer for that question ...hope u dont mind ..and sorry for the troouble

aforarihant19
Newbie Poster
5 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

Hi,

Just tried punching in the source code as listed by mahima, it doesn't work.........pls help...

NG






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

nirjhargarg
Newbie Poster
1 post since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

Pls Help me in doing this?

Write a program that will input a positive integer and print out the list of its prime factors. Comment on the run time of your algorithm and state any limitations that you have imposed on the input integers



.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

Saran_57
Newbie Poster
2 posts since Apr 2007
Reputation Points: 9
Solved Threads: 0
 

Actually int 21h function 2 will only display the single ascii character contained in dl. It will not output an entire string, and still less convert a floating point number into a string and then output it.

Beginners in assembly language always think that they are still programming in a high level language. Writing a procedure to convert a floating point number to a string, and then display it, is not a job I would particularly want, and I am not new to assembly language.

mathematician
Junior Poster
161 posts since Nov 2006
Reputation Points: 14
Solved Threads: 7
 

Thanks a lot :-)

Sangita
Newbie Poster
2 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

sir help me, i need a full program code in assembly language 8086. (multiplication : 4-digit number by 2-digit number)

rjong
Newbie Poster
2 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

i need a program using 8086.. a 4 by 2 multiplication...plsss....help me

rjong
Newbie Poster
2 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You