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

Recommended Answers

All 16 Replies

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

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)

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

.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

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>

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

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[/quote]
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>

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

.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

.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

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

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

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.

Thanks a lot :-)

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.