You are on page 1of 2

Name : hatf ghaffar

Roll No: SP18-BCS-051


Teacher Name: Tahir Muhammad
Question No 1.
 MOV CH, AL
 MOV DL, BL
 MOV DX, 33h
 MOV CX, 'AB'
 MOV AH, 010010001b
 MOV 1234h, BX
 MOV AX, -123
 MOV BX, 123
 MOV AX, -123
 MOV AH, 010010001b
 MOV AX, -123
 MOV 1234h, BX
 MOV AX, -123
 MOV DX, 33h

Answer:
We observe that when the number of bits exceeds 8 bit then the error occurs. Which means the value has been overflown.

Secondly if we try to add or manipulate addresses by adding or moving an address into another address then error occurs
because it is not valid. So based on these concepts of error a numerous amount of combinations can take place.

Answer:
a. MOV AL, 256
The operand is over 8 bit so we cannot move 256 to AL
b. MOV AX, F1ABh
There is actually an undefined value F1ABh. Due to which error occur.
c. MOV AX, -123
The value successfully moved and the emulator is showing a message
“PROGRAM HAS RETURNED CONTROL TO THE OPERATING SYSTEM”
d. MOV BX, 123
Value successfully moved in register BX
e. MOV AH, 010010001b
Value successfully moved in register AX register
f. MOV 1234h, BX
05 moved in register CX and remaining registers are still 00
g. MOV DX, 33h
33 moved in DX register and 04 in CX register
h. MOV CX, ‘AB’
41 moved in CX register H part and 41 in CX register L part
i. MOV CH, AL
03 moved in CX register Low part
j. MOV DL, BL
03 moved in CX register L portion
k. MOV AH, BL
03 moved in CX register L part
l. MOV AX, CL
There is an error of 8 and 16 bits is occurred because of over flow.

You might also like