Intel 8XC251SA User Manual page 309

Embedded microcontroller
Hide thumbs Also See for 8XC251SA:
Table of Contents

Advertisement

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:
CY
0
For division by zero:
CY
0
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
Bytes:
States:
[Encoding]
1 0 0 0
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
AC
Source Mode
1
1
10
10
0 1 0 0
AC
INSTRUCTION SET REFERENCE
OV
N
OV
N
1
?
OV
N
Z
Z
?
Z
A-57

Advertisement

Table of Contents
loading

This manual is also suitable for:

8xc251sb8xc251sp8xc251sq

Table of Contents