Experiment 8 pre-lab
Shift Rotate and Jump Instructions
Review the following concepts from the online
assembly book
·
Logical
Instructions
·
Shift Instructions
·
Rotate
Instructions
·
Conditional Jump
Instructions
·
Unconditional Jump
Instructions
You can also find these in your textbook from Pg.80
– 92.
Look at the following code. What will BX contain
after execution of the segment if we input 10010101
MOV
BX, 0000
MOV
CX, 0008
MOV
AH, 01H
L1:
INT 21H
SUB
AL, 30H
SHL
BL, 1
OR
XOR
BH, BH
Look at the following code. What will be the output
if BL is 11001011 before the execution.
MOV
CX, 0008 ;
CLC
NEXT:
RCL BL, 1
JNC
BIT_0
MOV
DL, '1'
MOV
AH, 02H
INT
21H
JMP
LAST
BIT_0:
MOV DL, '0'
MOV
AH, 02H
INT
21H
LAST:
LOOP NEXT
Take two 8-bit binary numbers (A and B) from the
user. Perform Logical AND operation on these numbers and
print the result in binary.