Omron C60K Video Game Controller User Manual


 
Appendix BProgramming Instructions and Execution Times
179
Name
Mnemonic
OperandsFunctionSymbol
BINARY-TO-BCD
BCD(24)
BCD(24)
S
R
Converts binary data in source word (S)
into BCD, and outputs converted data to
result word (R).
x16
0
x16
1
x16
2
x16
3
x10
1
x10
2
x10
3
S R
(BIN) (BCD)
x10
0
S:
IR
SR
HR
DM
R:
IR
HR
DM
BCD ADD
ADD(30)
ADD(30)
Au
Ad
R
CY CY
Adds two four-digit BCD values (Au
and Ad) and content of CY, and out-
puts result to specified result word (R).
Au + Ad +
R
Au/Ad
IR
SR
HR
TC
DM
#
R:
IR
HR
DM
BCD SUBTRACT
SUB(31)
SUB(31)
Mi
Su
R
Subtracts both four-digit BCD subtra-
hend (Su) and content of CY from
four-digit BCD minuend (Mi) and out-
puts result to specified result word (R).
CY CYMi - Su
R
Mi/Su:
IR
SR
HR
TC
DM
#
R:
IR
HR
DM
BCD MULTIPLY
MUL(32)
MUL(32)
Md
Mr
R
Multiplies a words data or a four-digit
BCD value(Md) and another words
data (Mr) and outputs the result to a
specified result word (R).
Md X Mr R
R + 1
Md/Mr
IR
SR
HR
TC
DM
#
R:
IR
HR
DM
BCD DIVIDE
DIV(33)
DIV(33)
Dd
Dr
R
Divides a words data or a four-digit
BCD dividend (Dd) and another words
data (Dr) and outputs result to speci-
fied result word (R).
R
R + 1
Dd/Dr:
IR
SR
HR
TC
DM
#
R:
IR
HR
DM
SET CARRY
STC(40)
STC(40)
Sets carry flag (i.e., turns CY ON). None
CLEAR CARRY
CLC(41)
CLC(41)
CLC clears carry flag (i.e, turns CY
OFF).
None
REVERSIBLE
DRUM COUNTER
RDM(60)
RDM(60)
D
High-speed UP-DOWN counter opera-
tion.
D:
IR
HR
DM
HIGH-SPEED
DRUM COUNTER
HDM(61)
HDM(61)
D
A 2-kHz counter with both software
and hardware resets.
D:
IR
HR
DM
Refer to table at beginning of Appendix B for page references.