On Thu, 31 May 2007 21:22:12 -0700, Karan <maranmeetsu@[EMAIL PROTECTED]
>
wrote:
>hi,
> Plz, explain TR instruction in IBM Mainframe Assembler
>Programming with a simple Assembler code...
You should look at the POPs but here's a little snippet of code that
may help:
TR FIELDA,TABLE
..
..
..
..
..
FIELDA DC CL5'MOD14'
TABLE DS 0CL256
DC 192X'00'
DC X'010203040506070809'
DC 7X'00'
DC X'0A0B0C0D0E0F101112'
DC 8X'00'
DC X'131415161718191A'
DC 23X'00'
When the TR in this example is executed, the field (FIELDA) is
translated from left to right one byte at a time. To find the
appropriate code in the table, the in operand-1 field is treated as a
binray value that is added to the address of operand-2 (TABLE). The
the byte at the resulting address replaces the byte in the operand-1
field.
In the above example, once the TR is executed, the MOD14 in FIELDA
will be replaced with hex values 0E10050000.
Regards,
////
(o o)
-oOO--(_)--OOo-
"You can fool some of the people all the time,
and those are the ones you want to concentrate on."
-- George W. Bush (spoken at a Wa****ngton Dinner, March 2001)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remove nospam to email me.
Steve


|