Professional Documents
Culture Documents
ANA R
a: 1100 0011
R: 0101 0011
2. ANA M
a: 0011 0101
H: 0011 1000
L: 1011 1100
data: 0010 0001
ans: 0010 0001 - 21H
3. ORA M
a: 0010 1101
H: 0001 1101
L: 0010 1101
data: 0011 0001
ans : 0011 1101 - 3DH
4. XRA M
05 - 0101
07 - 0111
0101 0111
1000 1010
1101 1101
Ans - DDH
5. CMP R
a : 1010 0011
r1: 0010 1100
6. CMP M
a : 1101 1100 - 4+8+16+64+128 = 220
r1: 0010 0111 - 1+2+4+32 = 39
2s: 1101 1001
A : 1011 0101 - B5H = 181
sign = 0
zero = 0
carry = 1
7. CMP 8 bit
a : 1101 1100 - 4+8+16+64+128 = 220
8: 0111 0101 - 64+32+16+4+1 = 117
--------------------------------------
ROTATE INSTRUCTIONS
1. RLC - C for carry - we do not consider carry - LSB will move to the left i.e.
to the MSB and the MSB will now become the LSB
2. RRC - same as RLC but with rotate to the right - rotate right without carry
1. RLC
2. RRC
3. RAL
4. RAR