Of course you can. There are no bit patterns in hexadecimal, only sixteen symbols. Nor do the symbols need to be EBCDIC; they could as well be ASCII. I will admit that the UNPK/TR technique won;t work so well with Unicode, but then neither will TROT.
UNPK/TR is convenient when you only need to translate a few numbers, since it uses a much smaller translate table. The table sizes are probably not large enough for cache hits to be an issue. IAK, I want the UNPK/TRT example in order to emphasize that UNPK is not limited to decimal data. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Assembler List [[email protected]] on behalf of Steve Smith [[email protected]] Sent: Sunday, June 7, 2020 1:40 PM To: [email protected] Subject: Re: Does the z architecture have something like the SIMD instructions <snip> Something that I'd like to see inPoOps is an example of using UNPK and TR to convert binary to hexadecimal.</snip> You can't "convert" binary to hexadecimal, their bit patterns are the same. If you're referring to displaying bytes' hexadecimal representation in EBCDIC, then I'd say it's a bit late for that. Thanks to a tip from Rob Scott on this list several years ago, I like using TROT, especially when writing out a considerable amount of storage, like a dump. The TROT table starts thus: DC C'000102030405060708090A0B0C0D0E0F' ... and continues for the obvious 15 more lines. sas
