🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.asm370
Article #214

Re: Collating sequence of Hex ...

#214
From: Michael Johnson
Date: Fri, 27 Oct 1989 13:03
30 lines
1556 bytes
If you don't care what your result looks like, you can translate A-F, which
are X'C1'-X'C6' into X'FA'-X'FF'. This would cause them to be collated
properly and would also be a good step to use just prior to packing the hex
string if you are converting from "zoned hex" to binary.

An example code segment:

TRANSLAT DS   0H
         TR   HEXSTRNG(8),HEXPREP
         PACK PACKED(5),HEXSTRNG(9)
         MVC  BINARY(4),PACKED
         .
         .
         .
HEXPREP  DS   0XL256
         DC   256X'00'
         ORG  HEXPREP+X'a'
         DC   X'FAFBFCFDFEFF'
         ORG  HEXPREP+X'A'
         DC   X'FAFBFCFDFEFF'
         ORG  ,
PACKED   DS   CL8
BINARY   DS   F

This becomes a little trickier if your hex string can vary in length, but
that would merely necessitate the use of EXecute.

Michael Johnson                           "We are the Priests of the Temples
University of Maine System                 of Syrinx. Our great computers fill
Computing and Data Processing Services     the hallowed halls." - Neil Peart
Technical Details
Message-ID: <8910271320.AA27728@brazos.rice.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!MAINE.MAINE.EDU!michael

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!MAINE.MAINE.EDU!michael
From: michael@MAINE.MAINE.EDU (Michael Johnson)
Newsgroups: comp.lang.asm370
Subject: Re: Collating sequence of Hex ...
Message-ID: <8910271320.AA27728@brazos.rice.edu>
Date: 27 Oct 89 13:03:12 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: IBM 370 Assembly Programming Discussion List <ASM370%UCF1VM.BITNET@ricevm1.rice.edu>
Distribution: inet
Organization: The Internet
Lines: 30