These are bit logical operations (AND,OR,XOR,NOT).
Patater GBAGuy Mirror
If you don't know what AND,OR,XOR,and NOT do as logical bit operations, go find
a good C book. But don't worry, I'll explain them anyway.
AND,OR,XOR all work like the following:
(using AND as an example):
and bx,6 ; BX = BX & 6;
NOT works somewhat differently:
not ax ; will reverse all the bits in AX.
00001111 ; a 1 and a 1 is a 1 otherwise 0.
11001100 ; if either one is 1 then 1, if neither is 1 then 0.
00110011 ; one or the other 1, if both or neither are 1 then 0.
-------- ; flips all the bits
So that this "day" isn't humilitatingly short, here's the rotate instructions:
ROL stands for ROtate Left, and ROR stands for ROtate Right. These instructions
work like shifts, except that every time, the bit that falls off the end is the bit put
onto the beginning. So that a:
rol dx,16 ; will make DX stay the same
ror ax,16 ; will make AX stay the same
ror bl,8 ; will make BL stay the same
You can probably use CL the same way you did for the shifts.
This Day In Review
If I can't think of anything else I'll defer to graphics!
Until Next Time!,
- Mike H a.k.a GbaGuy
Intro - Day 10