Translate
and
Test
(TRT)
General
Description
Format
(55)
Condition
Code
Interrupt
Action
Notes
Logical
Instructions
•
The
variable
length
operand, which is specified by
the
first
address
(BdD
1
),
is used
as
the
argument
(byte-by-byte) to reference a
list
(func-
tions) specified by
the
second
address
(B
2
/D
2
).
The
functions referenced
are
inspected
for
zero
or
non-zero.
If
a non-zero is encountered,
the
address
of
the
argument
byte is loaded into General
Register
1 (General
Register
13
in
P
a
;
General
Register
9 in P
4)
and
the
function
byte
is loaded into
the
rightmost
end
of
General
Register
2 (General
Register
14
in
P
3
;
General
Register
10
in
P 4). Whenever zeros
are
encountered
in
the
function
list,
the
operation proceeds to
the
next
byte. The first
operand
is unaltered.
The
bytes
of
the
first operand
are
termed
the
argument
bytes.
Processing
of
the
first
operand
is
from
left-to-right, one byte
at
a time.
Each
argument
byte
is added to
the
second operand, which is
the
starting
location
of
the
translate
table. This sum,
in
turn,
addresses a byte location
within
the
table, which is
termed
a function byte. Then,
the
function
byte
retrieved
from
the
table is inspected
for
all zeros.
If
the
function byte is all zeros,
the
operation proceeds to
the
next
argument
byte
and
continues processing.
If
the
function
byte
is
not
all
zeros,
the
instruction
inserts
the
address
of
the
argument
byte
in
the
low-
order
24
bits
of
General
Register
1 (13
or
9)
and
inserts
the
retrieved
non-zero function byte
in
the
low-order eight-bits
of
General
Register
2
(14
or
10).
The
high-order
eight
bits
of
General
Register
1 (13
or
9)
and
high-order
24 bits
of
General
Register
2 (14
or
10)
are
unaltered.
The
operation
terminates
when a (non-zero) function
byte
is accessed
or
when
the
first operand field is exhausted.
DD
L
o
7 8
15 16 19 20 31 32 35
36
47
• 0 - accessed function bytes all zeros.
1 - a non-zero function byte is encountered before
the
first
operand
field is exhausted.
2 -
the
last
function
byte
is non-zero.
3-not
used.
• Address
error:
Addressing.
• 1.
The
variable
length
field specified by
the
first
address
is unaltered.
2.
If
non-zero functions
do
not
occur, General
Registers
1 (13
or
9)
and
2 (14
or
10)
are
unaltered.
3. The first
operand
and
the
translation
table
are
addressed by
their
leftmost bytes.
4.
The
length
of
the
table,
in
general,,)
must
be 256 bytes, unless
the
domain
of
argument
bytes is limited to a specific
subset
by
the
program
and
data.
5.
The
L field specifies
the
length
of
the
first
operand
minus
one.
6.
This
instruction
is useful
for
scanning
input
streams
and
locating
delimiters
for
variable
length
records
and
fields.
7.
In
processor
states
PI
and
P
2,
General
Registers
1
and
2
are
used.
In
processor
state
P3'
General
Registers
13
and
14
are
used.
In
processor
state
P
4,
General Registers 9
and
10
are
used.
183