; TITLE "SPA2HC - Syslib 4.0" NAME ('PA2HC') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SPA2HC.Z80 by Richard Conn ; Date : 28 Oct 89 ; Version : 1.3 ; Module : SPA2HC ; Abstract: This module contains the routine PA2HC which prints ; the contents of register A as two hexidecimal digits on ; the CON: device. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC PA2HC ; From SYSLIB Get.. EXT COUT, @B2HH, @B2HL .Z80 CSEG ;=============================================================== ; NAME - PA2HC ; Entry: A - Character to be printed ; Exit : - Nothing returned, the character is printed ; Uses : - None ; Special Requirements: - None ;=============================================================== PA2HC: PUSH AF ; Save A CALL @B2HH ; Convert High Nybble to Hex CALL COUT ; ..and print POP AF ; Restore A PUSH AF ; Save A CALL @B2HL ; Convert Low nybble to Hex CALL COUT ; ..and print to CON: POP AF ; Restore A and Flags RET END