; TITLE "SMA2HC - Syslib 4.0" NAME ('MA2HC') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SMA2HC.Z80 by Richard Conn ; Date : 28 Oct 89 ; Version : 1.3 ; Module : SMA2HC ; Abstract: This module contains the routine MA2HC which writes ; the character in the A register as two hexidecimal charac- ; ters to a specified memory location. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC MA2HC ; From SYSLIB Get.. EXT @B2HH, @B2HL .Z80 CSEG ;=============================================================== ; NAME - MA2HC ; Entry: DE - Points to 2-byte memory buffer ; A = Character to be printed ; Exit : DE - Points to the character after the buffer ; Uses : DE ; Special Requirements: - None ;=============================================================== MA2HC: PUSH AF ; Save A CALL @B2HH ; Convert High Nybble to Hex LD (DE),A ; .save INC DE ; ..and bump ptr POP AF ; Restore A PUSH AF ; Save A CALL @B2HL ; Convert Low nybble to Hex LD (DE),A ; .store it INC DE ; ..and bump pointer POP AF ; Restore A RET END