Compare collated
CC
This instruction compares the field designated by K1,Cl with the field
designated by K2,C2 as specified by the 60-bit instruction word.
The compare is from left to right through the fields until two unequal
characters are found. These two characters are then collated and referenced in
the collate table beginning at address A0 (table 4-10).
If the table values
found for the two unequal characters are equal, the compare continues until
another pair of characters is unequal or until the field length is exhausted.
If the table values found for the two unequal characters are unequal, XO is set
prior to instruction termination as follows:
If field K1 is greater than field K2, set XO to 0000 0000 0000 0000 Oxxx.
If field K1 is equal to field K2, set
XO
to 0000 0000 0000 0000 0000.
If field K1 is less than field
K 2 ,
set XO to 7777 7777 7777
7777
7yyy
where
yyy
is the complement of wx.
The value of the three octal numbers xxx that are stored in XO is determined by
the equation
L
minus N equals
xxx
(L is the length of the field, and N is the
number of-pairs of characters that were collated equal prior to instruction
termination).
In other words, xxx is the number of pairs of characters not yet
compared plus 1 .
The A0 register contains the starting word address of an 8-word, 64-character
collate table (table 4-10).
This table must have been previously stored in
consecutive CM locations.
The collated value of a character is found by examining the collate table. The
upper 3 bits of the character to be collated are added to A0 to obtain the
relative address of the word containing the collated value.
The lower 3 bits
of the character to be collated specify the character address of the collated
value.
Example
:
Suppose the character under examination is an octal 63. The 6 is
added
to
the A0 to form the word address. The 3 is used to pick the correct
character from that word.
The value of 63 is 63 in the collate table.
Need help?
Do you have a question about the Cyber 170 State and is the answer not in the manual?
Questions and answers