Hitachi NJI-350B Video Game Controller User Manual


 
Chapter 5 Instruction Specifications
5-10
R7F4
R7F3
R7F2
R7F1
R7F0
Process
time
(µ s)
Classification
Item number
Ladder symbol
Instruction
symbol
Instruction
name
Process descriptions I/O types used
DERERR SD V C
MICRO-EH
Steps
Remarks
Conversion
18 BCD(d, s)
Binary
BCD
conversion
Converts the value of s into
BCD and stores it in I/O
number d. If the value of s
is an error, DER (R 7F4) =
1 is set.
[Word]
d: WY, WR, WM
s: WX, WY, WR,
WM, TC,
Constant
zzzz
79
89
3
4
Upper
case: W
Lower
case: DW
19 BIN(d, s)
BCD
Binary
conversion
Converts the value of s into
binary and stores it in I/O
number d. If the value of s
is an error, DER (R 7F4) =
1 is set.
[Double word]
d: DY, DR, DM
s: DX, DY, DR,
DM, Constant
zzzz
49
75
3
4
Upper
case: W
Lower
case: DW
20 DECO(d, s, n) Decode Decodes the value indicated
by the least significant n
bits of s, and sets the bit
that corresponds to the
decoding result of the bit
row starting from I/O
number d, to 1.
d: R, M
s: WX, WY, WR,
WM, TC,
Constant
n: Constant(1-8)
zzzz
105 4 *3
21 ENCO(d, s, n) Encode Encodes the bit location in
which 1 is set within the bit
row, which starts with I/O
number s and lasts for the
amount of nth power of 2,
and stores it in I/O number
d. If multiple bits that
contain 1 exist, the one
with the upper bit locations
will be encoded.
d: WY, WR, WM
s: R, M
n: Constant(1-8)
zzz
128 4 *3
*3: Processing time when n=1.
R7F4
R7F3
R7F2
R7F1
R7F0
Process
time
(µ s)
Classification
Item number
Ladder symbol
Instruction
symbol
Instruction
name
Process descriptions I/O types used
DERERR SD V C
MICRO-EH
Steps
Remarks
22 BCU(d, s) Bit count Among the contents of s
(word, double-word), stores
the number of bits that are
set to 1 in I/O number d.
[Word]
d: WY, WR, WM
s: WX, WY, WR,
WM, TC,
Constant
zzzzz
33 3 Upper
case: W
[Double word]
d: WY, WR, WM
s: DX, DY, DR,
DM, Constant
42 4 Lower
case: DW
Application instruction
23 SWAP(d) Swap Swaps the upper 8 bits and
the lower 8 bits of the value
(word) for I/O number d.
d: WY, WR, WM
zzzzz
25 2
24 UNIT(d, s, n) Unit Stores the lower 4 bit
values of the n words
starting with s in the lower
4 bits each of d (word).
d: WY, WR, WM
s: WR, WM
n: Constant(0-4)
zzzz
100 4 *4
25 DIST(d, s, n) Distribute Extracts the value of s
(word) in 4 bit units from
the least significant bits,
and sets them in the lower 4
bits of each word starting
with I/O number d (word).
The upper bits are set to 0.
d: WR, WM
s: WX, WY, WR,
WM, TC,
Constant
n: Constant(0-4)
zzzz
87 4 *4
*4: Processing time when n = 1