2.2.27 (1) DIVXU (B)
DIVXU (DIVide eXtend as Unsigned)
Divide
Operation
Rd ÷ Rs
→
Rd
Assembly-Language Format
DIVXU.B
Rs, Rd
Operand Size
Byte
Condition Code
H: Previous value remains unchanged.
N: Set to 1 if the divisor is negative;
otherwise cleared to 0.
Z:
Set to 1 if the divisor is zero; otherwise
cleared to 0.
V: Previous value remains unchanged.
C: Previous value remains unchanged.
I
UI
H
U
N
Z
V
C
—
—
—
—
↕
↕
—
—
Description
This instruction divides the contents of a 16-bit register Rd (destination register) by the contents
of an 8-bit register Rs (source register) and stores the result in the 16-bit register Rd. The division
is unsigned. The operation performed is 16 bits ÷ 8 bits
→
8-bit quotient and 8-bit remainder. The
quotient is placed in the lower 8 bits of Rd. The remainder is placed in the upper 8 bits of Rd.
Valid results are not assured if division by zero is attempted or an overflow occurs. For
information on avoiding overflow, see DIVXU Instruction, Zero Divide, and Overflow.
Available Registers
Rd:
R0 to R7, E0 to E7
Rs:
R0L to R7L, R0H to R7H
Operand Format and Number of States Required for Execution
Notes
Rd
Rs
Rd
Dividend
÷
Divisor
→
Remainder
Quotient
16 bits
8 bits
8 bits
8 bits
Instruction Format
1st byte
2nd byte
3rd byte
4th byte
Register direct
DIVXU.B
Rs, Rd
5
1
rs
rd
14
No. of
States
Addressing
Mode
Mnemonic
Operands
90