; Library: ZSLIB ; Version: 2.0 ; Module: ZSMAHC ; Version: 1.0 ; Author: Carson Wilson ; Date: January 6, 1990 ; Purpose: Store A as up to 2 hex characters with leading spaces to ; memory at DE. PUBLIC MAHC EXTRN @B2HH,@B2HL ; SYSLIB4 EXTRN MOUT ; ZSLIB ; ; MAHC - Store A as up to 2 hex characters with leading spaces to memory at DE. ; ; Entry: - contains value to put. ; - points to memory area (2 bytes max.) ; Exit: - points to byte after output. ; Uses: . MAHC: push af push af call @B2HH ; High of A to hex char. in A cp '0' jr nz,MAHC1 ; Store digit if not zero ld a,' ' ; ..else store space MAHC1: call MOUT ; Digit or space pop af call @B2HL ; Low of A to hex char. in A call MOUT ; Store & return pop af ret end ; End ZSMAHC.Z80