bunga

Tugas 4

18.Describe the operation of each of the following instructions:
(a) PUSH AX
(b) POP ESI
(c) PUSH [BX]
(d) PUSHFD
(e) POP DS
(f) PUSHD 4
Answers:
(a) The PUSH AX instruction pushes the contents of AX onto the stack or AX is copied to the stack
(b) The POP ESI instruction removes a 32-bit number from the stack and places it into ESI or A 32-bit number is retrieved from the stack and placed into ESI.
(c) The PUSH [BX] instruction pushes the 16-bit contents of the data segment memory location addressed by BX onto the stack or the word contents of the data segment memory location addressed by BX is pushed into the stack.
(d) The PUSHFD instruction pushes the EFLAGS register onto the stack
(e) The POP DS instruction removes a 16-bit number from the stack and places it into the DS register or A word is retrievied from the stack and placed into DS.
(f) The PUSHD 4 instruction places a 32-bit number 4 onto the stack.

60.Develop a near procedure that stores AL in four consecutive memory locations, within the data segment, as addressed by the DI register.
Answers:
STORE PROC NEAR
MOV [DI],AL
MOV [DI+1],AL
MOV [DI+2],AL
MOV [DI+3],AL
STORE ENDP