Hitachi NJI-350B Video Game Controller User Manual


 
Chapter 5 Instruction Specifications
5-54
Item number Arithmetic instructions-9 Name Binary division (BINARY DIVISION)
Ladder format Condition code
Processing time (µs)
Remark
R7F4 R7F3 R7F2 R7F1 R7F0
Average Maximum
d = s1 / s2 DER ERR SD V C Upper case: W
zzzz 55
Lower case: DW
Instruction format Number of steps
Condition Steps
d = s1 / s2 Word 4 110
Double word 6
Bit Word Double word
Usable I/O
XY
R,
M
TD, SS,
CU, CT WX WY
WR,
WM TC DX DY
DR,
DM
Constant
Other
d Substitution destination {{{ {{
s1 Dividend {{{{{{{{
s2 Divisor
{{{{{{{{
Function
Divides s1 by s2 as the binary data and substitutes the quotient into d in binary. The remainder is set in the special internal
output WRF016 (DRF016 in the case of double word).
The DER flag is set to “1” if s2 is “0,” and the operation is not performed. As long as s2 is not set to “0”, the flag is set to
“0” and the operation is performed.
WR0041 WR0040
WR0042 WRF016. . .
Example: WR0042 = WR0040/WR0041
Example: DR0047 = DR0045/DR0043
WR0041 WR0043
DR0043
WR0046 WR0045
DR0045
WR0048 WR0047
DR0047
WRF017 WRF016
DRF016
. . .
Notes
The combinations of d, s1 and s2 are as follows:
ds1s2
Word Word Word
Double word Double word Double word
Program example
X00000
WR0042= WR0040 / WR0041
LD X00000
[
WR0042 = WR0040 / WR0041
]
Program description
When input X00000 is on, the value of WR0040 is divided by the value of WR0041, then substituted into WR0042. The
remainder is substituted into special internal output WRF016.
d = s1 / s2