Write the assembly language code segmentadd comment for each

Write the assembly language code segment(add comment for each instruction) to perform for the following operations, and show your final results in AX and DX: -(65)/7 AX: DX: 17 - 14/5 + 21 - 11*4 AX: DX:

Solution

1)

divide -65 with 7 using 16bit operands
AX: quotient, DX:remainder

signed integer division

mov ax , -65

cwd ; extend AX into DX

mov bx, 7

idiv bx ; AX = -9.3, DX =

2) 17 - 14/5 +21 - 11*4

 Write the assembly language code segment(add comment for each instruction) to perform for the following operations, and show your final results in AX and DX: -

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site