; Library: ZSLIB ; Version: 2.1 ; Module: ZSMTIMM1 ; Version: 1.1 ; Author: Carson Wilson ; Date: February 2, 1990 ; Changes: Shortened code. ; Version: 1.0 ; Author: Carson Wilson ; Date: January 6, 1990 ; Purpose: Store military time. ; PUBLIC MTIMM1 EXTRN MA2HC ; SYSLIB EXTRN MOUT, MHL4DC ; ZSLIB ; ; MTIMM1 - Store military time as "hh:mm" to memory at DE. ; Store relative time as "+nnnn" to memory at DE. ; ; Entry: - points to date as BCD yy mm dd hh mm ; - points to memory (5 bytes). ; Exit: - points to byte after output. ; Uses: - . ; MTIMM1: push hl push af inc hl inc hl inc hl bit 7,(hl) jr z,REALTM ld a,'+' ; Show relative time call MOUT ;push de ;ld d,(hl) ;inc hl ;ld e,(hl) ;ex de,hl ;pop de ld a,(hl) inc hl ld l,(hl) ld h,a res 7,h ; Remove flag call MHL4DC ; Store relative time jr EXIT REALTM: call MM2HC ; Store hours ld a,':' call MOUT inc hl call MM2HC ; Store minutes EXIT: pop af pop hl ret ; --------------------------- ; Subroutines ; MM2HC - Store value at (HL) as 2 hex chars. MM2HC: ld a,(hl) jp MA2HC ; Display & return end ; End ZSMTIMM1.Z80