Load Address
LA RX 41
7 8 11 12 15 16 19 20 31
The address of the second operand is inserted in the
low-order 24 bits of the general register specified by R i The remaining bits of the general register are
made zero. No storage references for operands take
place.
The address specified by the X2, B2, and D2 fields is
inserted in bits 8-31 of the general register specified
by R i Bits 0-7 are set to zero. The address is not in­
spected for availability, protection, or resolution.
The address computation follows the rules for ad­
dress arithmetic. Any carries beyond the 24th bit are
ignored.
Condition Code: The code remains unchanged. Program Interruptions: None.
Programming Note
The same general register may be specified by the Rb X 2 , and H2 instruction field, except that general regis­
ter 0 can be specified only by the Ri field. In this
manner, it is possible to increment the low-order 24
bits of 2l general register, other than 0, by the con­
tents of the D2 field of the instruction. The register
to be incremented should be specified by Ri and by
either X 2 (with B2 set to zero) or B2 (with X2 set to
zero ). Translah! TR S5 DC L
B1 I B2 IU3J 78 15 16 19 20 31 32 35 36 . 47
The eight-bit bytes of the first operand are used as
arguments to reference the list designated by the sec­
ond operand address. Each eight-bit function byte se­
lected from the list replaces the corresponding argu­
ment in the first operand.
The bytes of the first operand are selected one by
one for translation, proceeding left to right. Each
argument byte is added to the entire initial address,
the second operand address, in the low-order bit po­
sitions. The sum is used as the address of the function
byte, which then replaces the original argument byte.
All data are valid. The operation proceeds until the
first operand field is exhausted. The list is not altered
unless an overlap occurs.
56
Condition Code: The code remains unchanged. Program Interruptions:
Protection
Addressing
Translate and Test
TRT 55 DD
7 8
L
B1 I B2 1516 1920 3132 3536 47
The eight-bit bytes of the first operand are used as
arguments to reference the list designated by the sec­
ond' operand address. Each eight-bit function byte
thus selected from the list is used to determine the
continuation of the operation. vVhen the function byte
is a zero, the operation proceeds by fetching and
translating the next argument byte. When the function
byte is nonzero, the operation is completed by insert­
ing the related argument address in general register
1, and by inserting the function byte in general regis­
ter 2.
The bytes of the first operand are selected one by
one for translation, proceeding from left to right. The
first operand remains unchanged in storage. Fetching
of the function byte from the list is performed as in
TRANSLATE. The function byte retrieved from the list
is inspected for the all-zero combination.
When the function byte is zero, the operation pro­
ceeds with the next operand byte. When the first op­
erand field is exhausted before a nonzero function byte
is encountered, the operation is completed by setting
the condition code to O. The contents of general regis­
ter 1 and 2 remain unchanged.
When the function byte is nonzero, the related ar­
gument address is inserted in the low-order 24 bits of
general register 1. This address points to the argument
last translated. The high-order eight bits of register 1
remain unchanged. The function byte is inserted in
the low-order eight bits of general register 2. Bits 0-23 of rcgister 2 remain unchanged. The condition code
is set to 1 when the one or more argument bytes have
not been translated. The condition code is set to 2 if
the last function byte is nonzero.
Resulting Condition Code:
o All function bytes are zero
1 Nonzero function byte before the first operand
field is exhausted
2 Last function byte is nonzero
3 Program Interruptions:
Addressing
Programming Note
The TRANSLATE AND TEST is useful for scanning an in­
put stream and locating delimiters. The stream can
thus be rapidly broken into statements or data fields
for further processing.
Edit
ED 55 DE L
Bl I B2 78 1516 19 20 31 32 35 36 47
The format of the source (the second operand) is
changed from packed to zoned and is edited under
control of the pattern (the first operand). The edited
result replaces the pattern.
Editing includes sign and punctuation control and
the suppressing and protecting of leading zeros. It
also facilitates programmed blanking of all-zero fields. Several numbers may be edited in one operation, and
numeric information may be combined with text.
The length field applies to the pattern (the first op­
erand). The pattern has the unpacked format and may
contain any character. The source (the second oper­
and) has the packed format and must contain valid
decimal digit and sign codes. The left four bits of a
byte must be 0000-1001; the codes 1010-1111 are
recognized as a data exception and cause a program
interruption. The right four bits are recognized as
either a sign or a digit.
Both operands are processed left to right one char­
acter at a time. Overlapping pattern and source fields
give unpredictable results.
The character to be stored in the first operand field
is determined by three things: the digit obtained from
the source field, the pattern character, and the state
of a trigger, called the S trigger. One of three actions
may be taken:
1. The source digit is expanded to zoned format
and is stored.
2. The pattern character is left unchanged.
3. A fill character is stored. S Trigger: The S trigger is used to control the stor­
ing or replacing of source digits and pattern charac­
ters. Source digits are replaced when zero suppression
or protection is desired. Digits to be stored in the re­
sult, whether zero or not, are termed significant. Pat­ tern characters are replaced or stored when they are
significance-dependent (such as punctuation) or sign­
dependent (such as credit symbols). The S trigger
also is used to record the sign of the source number
and set the condition code accordingly.
The S trigger is set to the zero state at the start of
the operation and is subsequently changed depending
upon the source number and the pattern characters. Pattern Character: Three pattern characters have a
special use in editing. They are the digit-select char­
acter, the significance-start character, and the field­
separation character. These three characters are re­
placed, either by a source digit or by a fill character;
their encoding is shown in the next table.
1. The digit-select character causes either a source
digit or the fill character to be inserted in the result
field.
2. The significance-start character has the same
function but also indicates, by setting the S trigger,
that the foll0'Ying digits are significant.
3. The field-separator character identifies individual
fields in a multiple-field editing operation. The char­
acter is replaced by the fill character. The S trigger is
set to zero, and testing for a zero-field is then re­
initiated.
4. All other pattern characters are treated in a com­
mon way: If the S trigger is one, the pattern character
is left unchanged; if the S trigger is zero, the pattern
character is replaced by the fill character.
If the pattern character is either a digit-select or a
significance-start character, the source digit is exam­
ined. The source digit replaces the pattern character
if the S trigger is one or if the source digit is nonzero.
If the nonzero digit is inserted when the S trigger is
zero, the S trigger is set to one to indicate that the
subsequent digits are significant. If the S trigger and
the source digit are both zero, the fill character is sub­
stituted for the pattern character.
Source Digit: When the source digit is stored in the
result, its code is expanded from the packed to the
zoned format by attaching a zone. When psw bit 12 is
zero, the preferred EBCDIC zone code 1111 is gener­
at,ed. When psw bit 12 is one, the preferred ASCII zone
code 0101 is generated.
The source digits are examined only once during an
editing operation. They are selected eight bits at a
time from the second operand field. The leftmost four
bits are examined first, and the rightmost four bits re­
main available for the next pattern character which
calls for a digit examination. However, the rightmost
Logical Operations 57
Previous Page Next Page