2 Instructions
2-198 CP1E CPU Unit Instructions Reference Manual(W483)
256-to-8 bit Conversion
When the fourth (leftmost) digit of C is 1, DMPX(077) finds the locations of the leftmost (highest bit
address) or rightmost (lowest bit address) ON bits in one or two 16-word ranges of source words. The
locations of these bits are written to R beginning with the specified byte.
Hint
Precaution
16-to-4 bit conversion
When two or more digits are being converted, DMPX(077) will write the values to the digits in R from
right to left and will wrap around to the rightmost digit after the leftmost digit, if necessary.
256-to-8 bit conversion
When two bytes are being converted, DMPX(077) will write the values to the bytes in R from right to left
and will wrap around to the rightmost byte if the leftmost byte (byte 1) has been specified as the starting
byte.
As shown at right, 16 to 4 encoding con-
sists of converting the bit number (m) of
the leftmost or rightmost bit that has 1 set
among the 16 bits to a 4-bit binary value.
As shown at right, 256 to 8 encoding con-
sists of converting the bit number (m) of
the leftmost or rightmost bit that has 1 set
among the 256 bits to an 8-bit binary
value.
R
C
Leftmost
bit
Rightmost
bit
R=0 (Convert one 16-word range.)
Finds leftmost bit
(Highest bit address)
256-to-8 bit decoding
(The location of the leftmost bit in the
16-word range (m) is written to R.)
n=1 (Start with byte 1.)
0 I/0 ln
m
S+1
S+14
S+15
S
1
m
015
1631
224239
240255
15 0m
001
m
00
4 bits
Rightmost ON bit
Leftmost ON bit
255 0m
001
m
00
8 bits
Rightmost ON bit Leftmost ON bit