Intel 8XC251SQ Microscope & Magnifier User Manual


 
A-57
INSTRUCTION SET REFERENCE
Exception: if register B contains 00H, the values returned in the accumulator and register B
are undefined; the CY flag is cleared and the OV flag is set.
Flags:
For division by zero:
Hex Code in: Binary Mode = [Encoding]
Source Mode = [Encoding]
Example: The accumulator contains 251 (0FBH or 11111011B) and register B contains 18 (12H or
00010010B). After executing the instruction
DIV AB
the accumulator contains 13 (0DH or 00001101B); register B contains 17 (11H or
00010001B), since 251 = (13 X 18) + 17; and the CY and OV flags are clear.
Binary Mode Source Mode
Bytes: 11
States: 10 10
Hex Code in: Binary Mode = [Encoding]
Source Mode = [Encoding]
Operation: DIV
(A) quotient (A)/(B)
(B) remainder (A)/(B)
DJNZ <byte>,<rel–addr>
Function: Decrement and jump if not zero
Description: Decrements the specified location by 1 and branches to the address specified by the second
operand if the resulting value is not zero. An original value of 00H underflows to 0FFH. The
branch destination is computed by adding the signed relative-displacement value in the last
instruction byte to the PC, after incrementing the PC to the first byte of the following
instruction.
The location decremented may be a register or directly addressed byte.
Note: When this instruction is used to modify an output port, the value used as the original
port data is read from the output data latch, not the input pins.
Flags:
CY AC OV N Z
0—✓✓✓
CY AC OV N Z
0—1??
[Encoding] 1 0 0 0 0 1 0 0
CY AC OV N Z
———✓✓