; Library: ZSLIB ; Version: 2.1 ; Module: ZSMDAT2 ; Version: 1.1 ; Author: Carson Wilson ; Date: February 2, 1990 ; Changes: No longer tests for invalid date/time. ; Version: 1.0 ; Author: Carson Wilson ; Date: January 6, 1990 ; Purpose: Store date in intermediate form. ; PUBLIC MDAT2 EXTRN MA2HC ; SYSLIB EXTRN MAHC,MOUT ; ZSLIB ; ; MDAT2 - Store intermediate form of date, e.g., " 2 Mar 88" to memory at DE. ; ; Entry: - points to date as BCD yy mm dd. ; - points to (9 bytes). ; Exit: - points to byte after output. ; Uses: - ; MDAT2: push hl push bc push af ld b,(hl) ; Save year inc hl ld c,(hl) ; Save month inc hl ; Get day ld a,(hl) ; Store day call MAHC call SPACE ; Store month xor a ; Clear carry for DAA ld a,c ; Get month ld hl,MONTHS-3 NXTMTH: inc hl inc hl inc hl ; Point to string dec a daa ; Decimal adjust jr nz,NXTMTH push bc ld b,3 ; 3 characters MMON: ld a,(hl) inc hl call MOUT djnz MMON pop bc call SPACE ; Store year ld a,b ; Get year call MA2HC pop af pop bc pop hl ret ; ------------------------------------ ; ; Subroutines ; SPACE: ld a,' ' jp MOUT ; ---------------------------------------------- ; ; Initialized Data ; MONTHS: db 'JanFebMarAprMayJunJulAugSepOctNovDec' end ; End ZSMDAT2.Z80