🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.asm370
Article #338

Re: Register Display

#338
From: Lewis T. Flynn
Date: Wed, 11 Apr 1990 18:02
24 lines
1798 bytes
In article <1035@rd1632.Dayton.NCR.COM> conwell@rd1632.Dayton.NCR.COM (Ted Conwell) writes:
>
>
>In article <ASM370%90033009415253@UCF1VM.BITNET> IBM 370 Assembly Programming Discussion List <ASM370@OHSTVMA> writes:
>>I am looking for an assembler macro that will convert the contents of a
>>register to printable characters.  IBM is bound to have one floating
>>around.  Can anybody lead me in the right direction?
>
>There is no macro that I know of to perform this function.  When I wanted
>to perform this, I wrote a routine to do it.  You need to store the register,
>perform the next step byte by byte.  Move the low-order byte to the low-order
>byte of an 8-byte work area.  Do a MVO of the same byte to the next byte in
>the work area.  Continue with each byte.  Do an NC with a mask of 
>'OFOFOFOFOFOFOFOF' and that will turn off the high-order bits of the
>bytes.  Do a TR on the work field to convert the bytes to display
>characters with a table of C'0123456789ABCDEF'.  This will convert ...

This look likes it works, but I've always seen this done by storing the
value, unpacking it with a length of 5 into a 9 byte area, and TRing
the first eight bytes to convert the 0xFA-0xFF's to 0xC1-0xC6 (or
0x81-0x86) if you want lower case). This gives you what you want in the
first 8 bytes. The 9th byte is trash.

Terry
Technical Details
Message-ID: <cblz02fn9baM01@amdahl.uts.amdahl.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!amdahl!terry
References: <1035@rd1632.Dayton.NCR.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!amdahl!terry
From: terry@uts.amdahl.com (Lewis T. Flynn)
Newsgroups: comp.lang.asm370
Subject: Re: Register Display
Message-ID: <cblz02fn9baM01@amdahl.uts.amdahl.com>
Date: 11 Apr 90 18:02:25 GMT
References: <1035@rd1632.Dayton.NCR.COM>
Reply-To: terry@amdahl.uts.amdahl.com (Lewis T. Flynn)
Organization: Amdahl Corporation, Sunnyvale CA
Lines: 24