\IDENT\HEXOUT
* BASIC IO PACKAGE -- 19720713
* P850, P855, P860
*
* CALLING SEQUENCE:  CF   A14,NAME
* WHERE:                  A14 = REGISTER WITH LINKSTACKPOINTER
*                         NAME  = ENTRY POINT NAME OF CALLED SUBROUTINE
*
* LINKSTACK: 3 ENTRIES USED MAXIMUM
* A15 STACK IS USED FOR REGISTER SAVE AREA
\ENTRY\HEXOUT
\EXTRN\PASC2
\EXTRN\ASCOUT
* ASSIGNMENTS
ASR\EQU\/10\DEV ADDR
HSR\EQU\/20\DEV ADDR
HSP\EQU\/30\DEV ADDR
*
S\EQU\1\START
H\EQU\0\HALT
*
* HEXOUT--PRINT A1 HEX ON TELETYPE
*         RETURN: A6,A7 UNDEFINED, A1 UNCHANGED
*
HEXOUT\LDKL\A6,/202F
\CF\A14,PASC2\ /
\STR\A4,A15\SAVE A4
\LDK\A4,4\4 DIGITS
SDIG\LDK\A7,12
\SRC\A1,1\SRC A1,12
\SUK\A7,1
\RB(1)\*-4
\LDK\A6,/F
\ANR\A6,A1\MASK DIGIT
\ADK\A6,/30
\CWK\A6,/3A
\RF(2)\*+4\0-9
\ADK\A6,7\A-F
\CF\A14,ASCOUT\PRINT DIGIT*
\SUK\A4,1
\RB(4)\SDIG
\LDR*\A4,A15\RESTORE A4
\RTN\A14
\END

