On 12 September 2016 at 11:52, Bernd Oppolzer <[email protected]> wrote: > You need two additional bytes after ONEBYTE and TWOBYTE, > so that UNPK can do its nibble switching thing there.
If you have many bytes to convert (say, more than 7), the TROT (TRanslate One to Two) instruction with a 512 byte table can do it all in one step with effectively unlimited length. Whether this is faster than a loop of UNPKs and TR fixups (of course you need only one TR for up to 256 bytes), I don't know. Certainly it's conceptually easy to understand. A warning, though. The fine print in the instruction description says "The translation table is *treated as being* on a double-word boundary" [my emphasis]. This means TROT silently ignores the rightmost 3 bits of the table address, so make sure you actually put it on a doubleword boundary. HLASM cannot warn about this, because the address is in a register. (Ask me how I know about this problem...) Tony H. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
