APU CSLLT 10 - Bit Manipulation Commands
APU CSLLT 10 - Bit Manipulation Commands
CT073-3-2
– AND
– OR
– XOR
– SHL
– SHR
– ROL
– ROR
Example:-
MOV AH,198
AND AH,117
Example:-
MOV AH,198
OR AH,117
MOV AH,198
XOR AH,117
xor ah,ah
• The reason why it is used to initialise is
due to the fact that it runs faster than a
similar mov instruction.
Example:-
MOV AH,198
SHL AH,2
11000110
High order bits
are lost Low order bits
(discarded) (zeros) are
added
1100011000
Shift Direction
Example:-
MOV AH,198
SHR AH,2
0011000110
Shift Direction
Example:-
MOV AH,198
ROL AH,2
1100011011
Rotate Direction
Example:-
MOV AH,198
ROR AH,2
1011000110
Rotate Direction
Q&A
Flow Control