Examples
ADD CL,AL - Add CL to AL and put the answer into CL.
ADD AL,22 - Add 22 to AL and put the answer into AL.
The answer always goes into the first register in the command.
DEC BL - Subtract one from BL and put the answer into BL.
The other commands all work in the same way.
Flags
If a calculation gives a zero answer, set the Z zero flag.
If a calculation gives a negative answer, set the S sign flag.
If a calculation overflows, set the O overflow flag.
An overflow happens if the result of a calculation has more bits than will fit into the available register. With 8 bit registers, the largest numbers that fit are -128 to + 127.
Share with your friends: |