3. Instructions
398
CS/CJ/NSJ Series Instructions Reference Manual (W474)
z 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
z 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.
z 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 consists 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 consists 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
=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.)
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