2-199

2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)

Conversion Instructions

2

DMPX

Sample program
16-to-4 bit Conversion

When CIO 0.00 is ON in the following example, DMPX(077) will find the leftmost ON bits in CIO 100,

CIO 101, and CIO 102 and write those locations to 3 digits in R beginning with digit 1 (the second digit),

as indicated by C (#0021).

Example of multi-digit decoding

Example of 16-to-4 bit decoding

C: #
R: D100
S
R
C
Digits
DMPX(077) finds the
leftmost ON bits.
Starting digit
(Digit 1)
0.00
03478
15 12 11
03478
15 12 11
1200
0123
5A2
1
1
1
0123456789
15 14 13 12 11 10
DMPX
100
D100
#0021
S: 100
101
102
C: #0032
C: #0011 C: #0030 C: #0013
R
R
R
R
Digit 1Digit 3 Digit 1Digit 3
Digit 1Digit 3
Digit 1Digit 3
Digit 2 Digit 0
Digit 2 Digit 0
Digit 2 Digit 0
Digit 2 Digit 0
S
S+1
15 0
S
S+1
S+2
S+3
15 0
8111215 0347
S
S+1
15 0
8111215 0347
8111215 0347
S
S+1
S+2
S+3
15 0
8111215 0347