Question #260838

write a program emu8086 take four digit number and write it to next memory address. Consider which memory address you should be using according to the answer of the first question.


Expert's answer

data segment

   x    dw  1234h

   y    dw  ?

ends

 

code segment

start:

; set segment registers:

    mov ax, data

    mov ds, ax

 

    lea si, x         ; address of four digit number

    mov ax, [si; ax = four digit number

    add si, 2       ; next address

    mov [si], ax  ; save four digit number to next memory address

 

    mov ax, 4c00h ; exit to operating system.

    int 21h   

ends

 

end start ; set entry point and stop the assembler.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS