; Library: ZSLIB ; Version: 1.0 ; Module: ZSPTIMM1 ; Version: 1.0 ; Author: Carson Wilson ; Date: August 9, 1988 ; Purpose: Print military time. ; PUBLIC PTIMM1 EXTRN COUT,PA2HC ; SYSLIB EXTRN PHL4DC ; ZSLIB ; ; PTIMM1 - Print military time as "hh:mm". ; Print relative time as "+nnnn". ; ; Entry: - points to date as BCD yy mm dd hh mm ; Exit: Time printed ; Uses: - None ; PTIMM1: push hl push de push af inc hl inc hl inc hl bit 7,(hl) jr z,REALTM ld a,'+' ; Show relative time call COUT ld d,(hl) inc hl ld e,(hl) ex de,hl res 7,h ; Remove flag call PHL4DC ; Print relative time jr EXIT REALTM: call PM2HC ; Print hours ld a,':' call COUT inc hl call PM2HC ; Print minutes EXIT: pop af pop de pop hl ret ; --------------------------- ; Subroutines ; PM2HC - Print value at (HL) as 2 hex chars. PM2HC: ld a,(hl) jp PA2HC ; Display & return end ; End ZSPTIMM1.Z80