Omron C60K Video Game Controller User Manual


 
123
If CY is not set by executing SUB(31), the result is positive, the second sub-
traction is not performed and HR 300 is not turned ON. HR 300 is pro-
grammed as a self-maintaining bit so that a change in the status of CY will
not turn it OFF when the program is recycled.
CLC(41)
SUB(31)
10
DM 01
HR 2
CLC(41)
SUB(31)
#0000
HR 2
HR 2
TR 0
1904
HR 300
0002
1904
HR 300
First
subtraction
Second
subtraction
Turned ON to indicate
negative result.
0000 LD 0002
0001 OUT TR 0
0002 CLC(41)
0003 @SUB(31)
10
DM 01
HR 2
0004 AND 1904
0005 CLC(41)
0006 @SUB(31)
# 0000
HR 2
HR 2
0007 LD TR 0
0008 AND 1904
0009 OR HR 300
0010 OUT HR 300
Address Instruction Operands
5-16-3 BCD MULTIPLY – MUL(32)
Md : Multiplicand word (BCD)
IR, DM, HR, TC, #
Mr : Multiplier word (BCD)
IR, DM, HR, TC, #
Ladder Symbol
Operand Data Areas
MUL(32)
Md
Mr
R
R : First result word (BCD)
IR, DM, HR
R and R + 1 must be in the same data area.Limitations
BCD Calculations Section 5-16