Omron C28K Video Game Controller User Manual


 
117
Some example Di values and the digit-to-word conversions that they produce
are shown below.
0
1
2
3
R
R + 1
R
R + 1
R + 2
0
1
2
3
0
1
2
3
0
1
2
3
R
R + 1
R + 2
R + 3
R
R + 1
R + 2
R + 3
S
Di : 0031 Di : 0023
Di : 0030Di : 0010
S
S
S
ER: Undefined digit designator, or R plus number of digits exceeds a data
area.
The following program converts three digits of data from DM 20 to bit posi-
tions and turns ON the corresponding bits in three consecutive words starting
with HR 1.
0000
MLPX(76)
DM 20
#0021
HR 1
Address Instruction Operands
0000 LD 0000
0001 MLPX(76)
DM 20
# 0021
HR 1
S: DM 20 R: HR 1 R+1: HR 2 R+2: HR 3
DM 00 2
0
HR 100 0 HR 200 0 HR 300 1
DM 01 2
1
HR 101 0 HR 201 0 HR 301 0
DM 02 2
2
HR 102 0 HR 202 0 HR 302 0
DM 03 2
3
HR 103 0 HR 203 0 HR 303 0
DM 04 1 2
0
HR 104 0 HR 204 0 HR 304 0
DM 05 1 2
1
1 HR 105 0 HR 205 0 HR 305 0
DM 06 1 2
2
HR 106 0 HR 206 1 HR 306 0
DM 07 1 2
3
HR 107 0 HR 207 0 HR 307 0
DM 08 0 2
0
HR 108 0 HR 208 0 HR 308 0
DM 09 1 2
1
2 HR 109 0 HR 209 0 HR 309 0
DM 10 1 2
2
HR 110 0 HR 210 0 HR 310 0
DM 11 0 2
3
HR 111 0 HR 211 0 HR 311 0
DM 12 0 2
0
HR 112 0 HR 212 0 HR 312 0
DM 13 0 2
1
3 HR 113 0 HR 213 0 HR 313 0
DM 14 0 2
2
HR 114 0 HR 214 0 HR 314 0
DM 15 0 2
3
HR 115 1 HR 215 0 HR 315 0
15
6
0
Not
Converted
Flags
Example
Data Conversion Section 5-15