User Manual
C166S V2
Detailed Instruction Description
User Manual
8-245
V 1.7, 2001-01
DIV
16-by-16 Signed Division
DIV
Group
Arithmetic Instructions
Syntax
DIV op1
Source Operand(s)
op1
→
WORD
MDL
→
WORD
Destination Operand(s)
MD
→
DOUBLEWORD
Operation
(MDL)
←
(MDL) / (op1)
(MDH)
←
(MDL) mod (op1)
Description
Performs a signed 16-bit by 16-bit division of the low order word stored in the MD
register by the source word operand op1. The signed quotient is then stored in the low
order word of the MD register (MDL) and the remainder is stored in the high order word
of the MD register (MDH).
CPU Flags
E
Always cleared.
Z
Set if quotient, stored in the MDL register, equals zero. Cleared
otherwise. Undefined if the V flag is set.
V
Set if an arithmetic overflow occurred, i.e. the quotient cannot be
represented in a word data type (only in case of 8000
H
/FFFE
H
), or if the
divisor op1 was zero. Cleared otherwise.
C
Always cleared.
N
Set if the most significant bit of the quotient, stored in the MDL register, is
set. Cleared otherwise. Undefined if the V flag is set.
Encoding
E
Z
V
C
N
0
*
*
0
*
Mnemonic
Format
Bytes
DIV
Rw
n
4B nn
2
Summary of Contents for C166S V2
Page 102: ...User Manual C166S V2 C166S V2 Memory Organization User Manual 3 102 V 1 7 2001 01...
Page 116: ...User Manual C166S V2 Instruction Pipeline User Manual 4 116 V 1 7 2001 01...
Page 152: ...User Manual C166S V2 Interrupt and Exception Handling User Manual 5 152 V 1 7 2001 01...
Page 204: ...User Manual C166S V2 Instruction Set User Manual 7 204 V 1 7 2001 01...
Page 420: ...User Manual C166S V2 Detailed Instruction Description User Manual 8 420 V 1 7 2001 01...
Page 432: ...User Manual C166S V2 Summary of CPU Subsystem Registers User Manual 9 432 V 1 7 2001 01...
Page 437: ...437...