Mitsubishi Electronics C64 Home Safety Product User Manual


 
8. Function Commands
S.BDECO
- 285 -
Program example
(1) Program to convert the low-order 8 bits (BCD) of R20 to the BIN data, and to store the results
obtained by decoding in D10 to D25 data
Coding
No. of
steps
Com-
mand
Device
10 LD X0
11 S.BDECO R22 D10
X0
S.BDECO R20 D10
10
15
B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1
B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
B31 B30 B29 B28 B27 B26 B25 B24 B23 B22 B21 B20 B19 B18 B17 B16
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
B47 B46 B45 B44 B43 B42 B41 B40 B39 B38 B37 B36 B35 B34 B33 B32
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
B255 B254 B253 B252 B251 B250 B249 B248 B247 B246 B245 B244 B243 B242 B241 B240
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R20
Invalid
D10
D11
D25
D12
(Note 1) Converting to BIN data is executed for the low-order 8 bits designated with S.
(Note 2) Decoding is executed for the BIN data after conversion.
(Note 3) D10 to D25 data of above example remains the same even if X0 turns OFF.