bunga

Tugas 6

12. Contrast the operation of a JMP [DI] with a JMP FAR PTR [DI].
Anwer:
The JMP [DI] instruction jumps to the memory location addressed by the offset addresse stored in the data segment memory location addressed by DI. The JMP PTR [DI] instruction jumps to the new offset address stored in the data segment memory location addressed by DI and the new segment addressed by data segment memory location address by DI+2. JMP [DI] is a near jump and JMP FAR PTR [DI] is a far jump.

26. Show the assembly language instructions generated by the following sequence:
Anwer:
.IF AL= =3
ADD AL,2
.ENDIF
Answer:
CMP AL,3
JNE @C0001
ADD AL,2
@C0001:

28. Develop a short sequence of instructions that uses the REPEAT-UNTIL construct to copy the contents of byte-sized memory BLOCKA into byte-sized memory BLOCKB until 00H is moved.
Answer :
MOV SI,OFFSET BLOCKA
MOV SI,OFFSET BLOCKB
CLD
.REPEAT
LODSB
STOSB
.UNTIL AL = = 0