Y C ompare Left (COM)
General Description
This instruction is used to determine the relative magnitude of two operands of equal length. The resulting PR1
settings permit alternate sequence of action.
Format
Operation —Y
N
— Number (0-44) characters to be compared. (See Appendix F-I.)
A Address — HSM address of leftmost character of first operand.
B Address — HSM address of leftmost character of second operand.
Direction of Operation
Left to right.
Outline of Operation
This instruction initially sets PRZ and operates in the following cycles:
The contents of the N Register are examined. If zero, the instruction terminates. If other than zero, the contents
of the HSM locations specified by the A and B Registers are transferred to the D
2
and D
:!
positions of the D
Register respectively. The contents of the A and B Registers are incremented by one. The contents of D
2
and D
:
are compared. If the contents of D
2
are greater than the contents of D
(
, PRP is set, and the instruction terminates.
If the contents of D, are greater than the contents of D
2
, PRN is set, and the instruction terminates. If the contents
of D. equal the contents of D„ the contents of the N Register are decremented by one, and the cycle is repeated.
Final Register Contents
(A)
t
= Address of location one to the right of the last character compared in first operand.
(B)
r
= Address of location one to the right of the last character compared in second operand.
PRI
PRI set according to outline of operation.
'
! v\ \ t > a i
CK,
V 1®
\
"R*.
I
^
>
Timing
Total time in microseconds
= 2In + 35, where n equals the number of characters compared.
Example #1
Instruction:
Operation
N
A Address
B Address
Y
5
1001
1007
HSM before and after Instruction is Executed:
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
s
M
I
T
H
—
s
M
I
T
H
—
VII-7
Summary of Contents for 301
Page 6: ...HRSfOTPflf I I I I ...
Page 16: ......
Page 34: ......
Page 43: ......
Page 44: ......
Page 47: ......
Page 48: ......
Page 61: ......
Page 62: ......
Page 74: ......
Page 75: ......
Page 76: ...j I j I I ...
Page 86: ......
Page 87: ......
Page 88: ......
Page 108: ......
Page 109: ......
Page 110: ......
Page 126: ......
Page 127: ......
Page 128: ...X ry V ...
Page 134: ......
Page 135: ...INPUT OUTPUT INSTRUCTIONS DATA RECORD FILE INPUT OUTPUT INSTRUCTIONS DATA RECORD FILE XI l ...
Page 136: ......
Page 154: ......
Page 156: ......
Page 175: ......
Page 176: ......
Page 180: ...WWH H i i w m H H J V fi t y v if i Hk I ...
Page 182: ......
Page 195: ......
Page 234: ......