Professional Documents
Culture Documents
Assignment 3
Assignment 3
Assignment 3
Execute the following instructions (single-step) in EMU8086 and mention the changes in
contents of destination operand.
a. MOV AX, ‘B’
b. MOV AX, 42h
c. MOV AX, 42d
d. MOV AX, 0100 0010b
e. MOV AX, 123Ah
f. MOV AX, 0FE44h
No
Instructions Error Correction Register Content
.
AX BX CX DX
AH AL BH BL CH CL DH CL
Overflow:
Use 16 bit register
1 MOV AL, 256 Operand over 8 01 00 00 00 00 23 00 00
MOV AX,256
bit
‘0’ will be used in
starting of
Wrong
2 MOV AX, F1ABh hexadecimal F1 AB 00 00 00 23 00 00
Parameter:
MOV
AX,0F1ABh
3 MOV AX, -123 FF 85 00 00 00 23 00 00
4 MOV BX, 123 00 00 00 7B 00 23 00 00
MOV AH,
5 91 85 00 7B 00 23 00 00
010010001b
Overflow:
6 MOV AL,0AC3h Operand is over MOV AX,0AC3H 0A C3 00 7B 00 23 00 00
8 bit
It will run but the
correct method
7 MOV 1234h, BX 0A C3 00 7B 00 23 00 00
should be
MOV [1234h],BX
8 MOV DX, 33h 0A C3 00 7B 00 23 00 33
9 MOV CX, ‘AB’ 0A C3 00 7B 41 42 00 33
10 MOV CH, AL 0A C3 00 7B C3 42 00 33
11 MOV DL, BL 0A C3 00 7B C3 43 00 7B
12 MOV AH, BL 7B C3 00 7B C3 43 00 7B
Task 3: For each of the following assembly language instructions, what will be the
possible register value (in hex)? Assume all statements are being executed in a
sequence and initially all registers contain zero.
No
Instructions Register Content
.
AX BX CX DX
AH AL BH BL CH CL DH CL
1 MOV AX, 010b 00 02 00 00 00 00 00 00
2 MOV BH, 10H 00 02 10 00 00 00 00 00
3 MOV CX, 10 00 02 10 00 00 0A 00 00
4 MOV DX, 1234H 00 02 10 00 00 0A 12 34
5 ADD DH, DL 00 02 10 00 00 0A 46 34
6 ADD AX, BX 10 02 10 00 00 0A 46 34
7 SUB CX, BX 10 02 10 00 F0 0A 46 34
8 SUB AH, DL DC 02 10 00 F0 0A 46 34
9 INC AX DC 03 10 00 F0 0A 46 34
10 INC BL DC 03 10 01 F0 0A 46 34
11 DEC DX DC 03 10 01 F0 0A 46 33
12 DEC CH DC 03 10 01 EF 0A 46 33