home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / sysutl / timezd12.lbr / TIMEZD12.AZM / TIMEZD12.ASM
Encoding:
Assembly Source File  |  1988-08-23  |  12.8 KB  |  737 lines

  1. ;**********************************************************************
  2. ;
  3. ;    TIMEZD 1.2
  4. ;
  5. ;    Full featured utility for setting/viewing current system time
  6. ;    using Z80DOS.
  7. ;
  8. ;    Eugene Nolan
  9. ;    7/9/88
  10. ;
  11. ;    With translations of:
  12. ;
  13. ;    DATEHL 1.0 by Carson Wilson
  14. ;    BCD2JUL    by Bridger Mitchell and Howard Goldstein
  15. ;
  16. ;********************************************************************
  17. ;    ASEG            ; Needed for M80 and RMAC, ignore error
  18. ;
  19.     ORG    0100H
  20. ;
  21.     JMP    START
  22. ;
  23. NO    EQU    0
  24. YES    EQU    NOT NO        ; (Some assemblers don't like 0FFh)
  25. ;
  26. ; Define version number
  27. ;
  28. MAIN    EQU    1        ; Main block number
  29. VER    EQU    2        ; Current version
  30. MONTH    EQU    07        ; Month
  31. DAY    EQU    09        ; Day
  32. YEAR    EQU    88        ; Year
  33. ;
  34.  
  35. TBUF    EQU    80h        ; Command line location
  36.  
  37. WHEEL    EQU    NO        ; *Yes if using ZCPR wheel byte
  38.  
  39. WHLOC    EQU    3EH        ; *Set to wheel location if WHEEL=Yes
  40.  
  41. PRBRDR    EQU    NO        ; Yes = print quasi-borders for libraries
  42.  
  43.     DB    'Z3ENV'        ; For ZCPR3 Environment ID
  44.     DB    1        ; Class 1, External
  45.     DW    0        ; Environment Address.    If using ZCPR33
  46.                 ; This can be left as is.
  47.  
  48. ZCPR3    EQU    NO        ; Allow named directory in command line
  49.  
  50. VERNAME:DB    13,10,'TIMEZD ',MAIN+'0','.'
  51.     DB    VER+'0',' -- '
  52.     DB    MONTH/10+'0',MONTH MOD 10+'0','/'
  53.     DB    DAY/10+'0',DAY MOD 10+'0','/'
  54.     DB    YEAR/10+'0',YEAR MOD 10+'0'
  55.     DB    13,10,13,10
  56.     DB    'Syntax:',13,10
  57.     DB    '  TIMEZD MM/DD/YY HH:MM:SS        for set 24 hour time',13,10
  58.     DB    '  TIMEZD MM/DD/YY HH:MM:SS [A][P] for set AM/PM time',13,10
  59.     DB    '  TIMEZD MM/DD/YY                 Default to 00:00:00',13,10
  60.     DB    '  TIMEZD                          Show current time',13,10
  61.     DB    '  TIMEZD [?][/]                   This message',13,10,13,10
  62.     DB '   MM optional if HH, SS optional if HH:MM (=0 if not present)'
  63.     DB    13,10,13,10,'$'
  64. ;
  65. ;-----------------------------------------------------------------------
  66. ;             Program starts here
  67. ;-----------------------------------------------------------------------
  68. ;
  69. START:    LXI    H,0
  70.     DAD    SP        ; HL=old stack
  71.     SHLD    STACK        ; Save it
  72.     LXI    SP,STACK    ; Get new stack
  73. ;
  74. ; See if help is wanted
  75. ;
  76.     LXI    H,TBUF
  77.     MOV    A,M        ; 1st Character
  78.     ORA    A        ; Was anything entered
  79.     JZ    DISDAT        ; Z=no,display current date
  80.     CPI    1
  81.     JZ    DISDAT
  82.     INX    H
  83.     INX    H
  84.     MOV    A,M
  85.     CPI    '?'        ; Is it "?"
  86.     JZ    HELPME
  87.     CPI    '/'
  88.     JZ    HELPME
  89.     LXI    D,TBUF+1
  90.  
  91. LOKDAT:    
  92.      IF WHEEL
  93.     LDA    WHLOC        ; If wheel option, only allow setting
  94.     ORA    A        ; time if wheel on
  95.     JNZ    LOKDT1
  96.     PUSH    D
  97.     LXI    D,WHLMES    ; No wheel, say can't do
  98.     CALL    PUTS
  99.     POP    D
  100.     JMP    EXIT2
  101. WHLMES:    DB    13,10,'NO wheel',13,10,'$'
  102. LOKDT1:
  103.      ENDIF        ;WHEEL
  104.     INX    D
  105.     call    eval10        ; convert month to binary
  106.     ORA    A        ; month can't be 0
  107.     JZ    BADDATE
  108.     CPI    13         ; can't be >12
  109.     JNC    BADDATE
  110.     STA    MONTHS        ; store month
  111.     LDAX    D        ; End of input line?
  112.     ORA    A
  113.     JZ    BADDATE        ; Z=yes, a no-no
  114.     INX    D        ; Skip /
  115.     call    eval10        ; convert
  116.     ORA    A        ; day can't be 0
  117.     JZ    BADDATE
  118.     CPI    32        ; or >31
  119.     JNC    BADDATE
  120.     STA    DAYS1        ; store day
  121.     LDAX    D        ; End of input line?
  122.     ORA    A
  123.     JZ    BADDATE        ; Z=yes, a no-no
  124.     INX    D        ; Skip /
  125.     call    eval10
  126.     STA    YEARS1        ; store year
  127.     LXI    H,YEARS1        ; pt at date
  128.     PUSH    D
  129.     call    bin2jul        ; get jul date in hl
  130.     POP    D
  131.     SHLD    JDAY        ; Save Julian day away
  132.     LDAX    D
  133.     ORA    A
  134.     JZ    DTIME        ; Z= End of input
  135.     INX    D
  136.     CALL    EVALBCD        ; Get hours
  137.     CPI    24H
  138.     JNC    CLERR
  139.     STA    HOURS
  140.     LDAX    D
  141.     ORA    A
  142.     JZ    DTIME        ; Z= end of input
  143.     CPI    ' '
  144.     JZ    LOKAMPM
  145.     INX    D
  146.     CALL    EVALBCD        ; Get minutes
  147.     CPI    60H
  148.     JNC    CLERR
  149.     STA    MINUTES
  150.     LDAX    D
  151.     ORA    A
  152.     JZ    DTIME        ; Z= End of input
  153.     CPI    ' '
  154.     JZ    LOKAMPM
  155.     INX    D
  156.     CALL    EVALBCD
  157.     CPI    60H
  158.     JNC    CLERR
  159.     STA    SECONDS
  160.     LDAX    D
  161.     ORA    A
  162.     JZ    DTIME        ; Z= end of input
  163.     CPI    ' '
  164.     JZ    LOKAMPM        ; Space entered, if so go look for Am/Pm
  165.  
  166. DTIME:    LXI    D,JDAY
  167.     MVI    C,104        ; Set Z80DOS system time
  168.     CALL    5
  169. EXIT2:
  170.     LHLD    STACK
  171.     SPHL
  172.     RET
  173.  
  174. LOKAMPM:
  175.     INX    D
  176.     LDAX    D
  177.     CPI    'A'        ; A(m)?
  178.     JZ    DTIME
  179.     CPI    'a'
  180.     JZ    DTIME
  181.     CPI    'P'        ; P(m)?
  182.     JZ    PM
  183.     CPI    'p'
  184.     JNZ    CLERR
  185. PM:    LDA    HOURS        ; P(m) entered, up hours by 12
  186.     CPI    12H
  187.     JZ    DTIME
  188.     ADI    12H
  189.     DAA
  190.     STA    HOURS
  191.     CPI    24H
  192.     JNC    CLERR        ; Time >24:00
  193.     JMP    DTIME
  194.  
  195.  
  196. HELPME:
  197.     LXI    D,VERNAME    ; Put up Verison/help message
  198.     MVI    C,9
  199.     CALL    5
  200.     JMP    EXIT2
  201. ;.....
  202. ;
  203. ; Playback the command line up to the character that stopped the scan
  204. ; and exit
  205. ;
  206. CLERR:    XRA    A        ; Clear "A" register
  207.     INX    D        ; Tag end of CLB
  208.     STAX    D        ; With terminator
  209.     CALL    CRLF        ; New line
  210.     LXI    D,ERRMS2    ; 'Error'
  211.     CALL    PUTS
  212.     LXI    D,ERRTAG    ; '->'
  213.     CALL    PUTS
  214.     LXI    H,TBUF+1    ; Playback CLB to error point
  215.  
  216. CLELP:    MOV    A,M        ; Character
  217.     ORA    A        ; Zero?
  218.     JZ    CLEX        ; Yes, exit
  219.     CALL    PUTCHR        ; No, output to console
  220.     INX    H        ; CLB pointer+1
  221.     JMP    CLELP        ; Continue
  222.  
  223. CLEX:    MVI    A,'?'        ; Tag line with a '?' field
  224.     CALL    PUTCHR
  225.     CALL    CRLF        ; New Line
  226.     JMP    EXIT2
  227. CRLF:    MVI    A,13
  228.     CALL    PUTCHR
  229.     MVI    A,10
  230.     CALL    PUTCHR
  231.     RET
  232.  
  233. PUTS:    PUSH    B        ; Output string pointed to by DE till $
  234.     MVI    C,9
  235.     PUSH    D
  236.     PUSH    H
  237.     CALL    5
  238.     POP    H
  239.     POP    D
  240.     POP    B
  241.     RET
  242.  
  243. SPACE:    MVI    A,' '
  244.  
  245. PUTCHR:
  246.     PUSH    B
  247.     PUSH    D
  248.     PUSH    H
  249.     MOV    E,A
  250.     MVI    C,2        ; CONOUT BDOS call
  251.     CALL    5
  252.     POP    H
  253.     POP    D
  254.     POP    B
  255.     RET
  256.  
  257. EVAL10:
  258.     XRA    A
  259.     MOV    B,A        ; B holds current number input
  260. EVAL1:    LDAX    D        ; Get input
  261.     CPI    '/'        ; / is seperator
  262.     JZ    DEVAL10        ; Z= done
  263.     ORA    A
  264.     JZ    DEVAL10        ; Z= at end of line
  265.     CPI    ' '
  266.     JZ    DEVAL10
  267.     SUI    '0'        ; Verify ascii 0-9
  268.     JC    BADDATE
  269.     CPI    10
  270.     JNC    BADDATE
  271.     INX    D
  272.     MOV    C,A        ; Old*10+new
  273.     MOV    A,B
  274.     ADD    A
  275.     ADD    A
  276.     ADD    B
  277.     ADD    A
  278.     ADD    C
  279.     MOV    B,A        ; B has current
  280.     JMP    EVAL1
  281. DEVAL10:
  282.     MOV    A,B
  283.     RET
  284.  
  285. EVALBCD:
  286.     XRA    A
  287.     MOV    B,A        ; B holds current number input
  288. EVLBC1:    LDAX    D        ; Get input
  289.     CPI    '/'        ; / is seperator
  290.     JZ    DEVBC10        ; Z= done
  291.     CPI    ':'
  292.     JZ    DEVBC10
  293.     ORA    A
  294.     JZ    DEVBC10        ; Z= at end of line
  295.     CPI    ' '
  296.     JZ    DEVBC10
  297.     SUI    '0'        ; Verify ascii 0-9
  298.     JC    BADDATE
  299.     CPI    10
  300.     JNC    BADDATE
  301.     INX    D
  302.     MOV    C,A        ; Old*10+new
  303.     MOV    A,B
  304.     ADD    A
  305.     ADD    A
  306.     ADD    A
  307.     ADD    A
  308.     ADD    C
  309.     MOV    B,A        ; B has current
  310.     JMP    EVLBC1
  311. DEVBC10:
  312.     MOV    A,B
  313.     RET
  314.  
  315.  
  316. BADDATE:            ; Bad input, put up Ver/help and command line
  317.     PUSH    D
  318.     LXI    D,VERNAME
  319.     CALL    PUTS
  320.     POP    D
  321.     JMP    CLERR
  322. ;
  323. ;    Binary to Julian Date routine.
  324. ;
  325. ; >>    hl -> yr,mo,da in bin
  326. ; <<     hl = Julian date
  327. ;
  328. ;
  329. bin2jul:
  330.     PUSH    PSW
  331.     PUSH    B
  332.     PUSH    D
  333.     MOV    A,M        ; A=yr
  334.     INX    H
  335.     MOV    C,M        ;c = mo
  336.     INX    H
  337.     PUSH    H        ;save ptr to day
  338.     PUSH    PSW        ;save year
  339. ;
  340. ; set hl= initial julian value of 77/12/31
  341. ;
  342.     LXI    H,0
  343.     SUI    78
  344.     JZ    B2JUL3
  345.     JNC    B2JUL0
  346.     ADI    100        ;<78, assume next century
  347. b2jul0:    MOV    B,A        ;b = # yrs > 78
  348.     MVI    A,1        ;init modulo 4 counter
  349.     LXI    D,365        ;days/yr
  350. b2jul1:    DAD    D        ;calc julian val. of  (yr/01/01 - 1)
  351.     INR    A
  352.     ANI    3        ;every 4 yrs,
  353.     JNZ    B2JUL2
  354.     INX    H        ;..add 1 for leap year
  355. b2jul2:    DCR    B
  356.     JNZ    B2JUL1
  357. ;
  358. ;     hl now = # days in years before current year
  359. ;
  360. b2jul3:    POP    PSW
  361.     ANI    3        ;if current yr == leap year
  362.     JNZ    B2JUL5
  363.     MOV    A,C
  364.     CPI    3        ;..and mo >= march
  365.     JC    B2JUL5
  366.     INX    H        ;..add the extra day (Feb 29)
  367. ;
  368. b2jul5:    MOV    B,C        ; b = month = # months +1 to sum
  369.     LXI    D,DPERMO    ;point at table
  370.     JMP    B2JUL7
  371. ;
  372. b2jul6:    call    addhl        ;add # days in this month
  373.     INX    D        ;bump tbl ptr
  374. b2jul7:    DCR    B
  375.     JNZ    B2JUL6
  376. ;
  377.     POP    D        ;ptr to day
  378.     call    addhl
  379.     pop    d
  380.     pop    b
  381.     pop    a
  382.     ret
  383.  
  384. addhl:    LDAX    D        ;add day of current month
  385. ;
  386. adda2hl:ADD    L
  387.     MOV    L,A
  388.     RNC
  389.     INR    H
  390.     ret
  391.  
  392. ;
  393. ; table of days per month (non-leap year)
  394. ;
  395.  
  396. dpermo:    db    31        ;jan
  397.     db    28        ;feb
  398.     db    31        ;mar
  399.     db    30        ;apr
  400.     db    31        ;may
  401.     db    30        ;jun
  402.     db    31        ;jul
  403.     db    31        ;aug
  404.     db    30        ;sep
  405.     db    31        ;oct
  406.     db    30        ;nov
  407.     db    31        ;dec
  408.  
  409. DISDAT:
  410.     CALL    CRLF
  411.     LXI    D,JDAY
  412.     MVI    C,105
  413.     CALL    5
  414.     LXI    H,JDAY
  415.     MOV    E,M        ; Get JD in DE
  416.     INX    H        ;
  417.     MOV    D,M        ;
  418.     XCHG            ; to HL
  419.     CALL    DATEHL        ;
  420.     PUSH    H        ; Month and Year in L,H
  421.     PUSH    PSW        ; Day in A
  422.     CALL    SPACE
  423.     CALL    SPACE
  424.     POP    PSW
  425.     JNZ    DAYOK        ; NZ = was a day there
  426.     POP    H
  427.     CALL    NODATE
  428.     JMP    DNOTOK
  429. DAYOK:    PUSH    PSW
  430.     LHLD    JDAY
  431.     LXI    D,7
  432. DAYCLC:
  433.     ORA    A        ; Clear the carry
  434.     PUSH    H        ; Put remainder in BC
  435.     POP    B
  436.     DW    52EDH        ; SBC HL,DE
  437.     JNC    DAYCLC        ; NC=not less than
  438.     MOV    A,C        ; C has remainder which is index to day array
  439.     LXI    H,DAYARY    ; Put out ascii of current day
  440.     CALL    LOOKUP
  441.     POP    PSW
  442.     POP    H
  443.     PUSH    H
  444.     PUSH    PSW
  445.     MOV    A,L        ; Month out
  446.     ANI    0FH        ; BCD coded, convert to binary
  447.     MOV    E,A
  448.     MOV    A,L
  449.     CPI    10H
  450.     JC    MOOK
  451.     MOV    A,E
  452.     ADI    10
  453.     MOV    E,A
  454. MOOK:    MOV    A,E
  455.     LXI    H,MONARY    ; Dsiplay ascii of month
  456.     CALL    LOOKUP
  457.     XRA    A
  458.     STA    SUPR        ; Suppress leading 0's 
  459.     POP    PSW
  460.     CALL    BCDOUT        ; Put out Day
  461.     LXI    D,MESS0        ; ', 19'
  462.     CALL    PUTS
  463.     POP    H
  464.     MVI    A,1
  465.     STA    SUPR        ; Keep leading 0's
  466.     MOV    A,H        ; Year out
  467.     CALL    BCDOUT
  468.     CALL    SPACE
  469.     CALL    SPACE
  470.     XRA    A
  471.     STA    SUPR        ; No leading 0's
  472.     LDA    HOURS
  473.     CPI    12H        ; 12 o'clock?
  474.     JZ    HR12        ; Z=yes, say PM
  475.     CPI    13H        ; >1 PM?
  476.     JC    HROK        ; C=NO
  477.     SUI    12H
  478.     DAA
  479. HR12:    PUSH    PSW
  480.     MVI    A,'P'        ; Pm
  481.     STA    AMPM+1
  482.     POP    PSW
  483. HROK:    CALL    BCDOUT        ; Put it out
  484.     MVI    A,':'
  485.     CALL    PUTCHR
  486.     MVI    A,1
  487.     STA    SUPR        ; Keep leading 0's
  488.     LDA    MINUTES
  489.     CALL    BCDOUT
  490.     MVI    A,':'
  491.     CALL    PUTCHR
  492.     LDA    SECONDS
  493.     CALL    BCDOUT
  494.     LXI    D,AMPM        ; Display AM or PM
  495.     CALL    PUTS
  496. DNOTOK:    CALL    CRLF
  497.     JMP    EXIT2
  498.  
  499. NODATE:                ; System time not set
  500.     LXI    D,NODATM
  501.     CALL    PUTS
  502.     RET
  503. NODATM:
  504.     DB    'No Date Set',13,10,'$'
  505.  
  506. LOOKUP:                ; Display element A of array pointed by HL
  507.     ORA    A
  508.     RAL
  509.     MOV    E,A
  510.     MVI    D,0
  511.     DAD    D
  512.     MOV    E,M
  513.     INX    H
  514.     MOV    D,M
  515.     CALL    PUTS
  516.     RET
  517.  
  518.  
  519. BCDOUT:
  520.     PUSH    B        ; Save
  521.     MOV    B,A        ; A holds BCD digits
  522.     RAR
  523.     RAR
  524.     RAR
  525.     RAR
  526.     ANI    0FH
  527.     MOV    C,A
  528.     ORA    A
  529.     JNZ    BCDOT0        ; Digit 0?
  530.     LDA    SUPR        ; Suppress leading 0's?    
  531.     ORA    A
  532.     JZ    BCDOT1        ; Z=yes
  533. BCDOT0:    MOV    A,C
  534.     CALL    BCDOT2        ; Output high order
  535. BCDOT1:    MOV    A,B
  536.     CALL    BCDOT2        ; And low order
  537.     POP    B
  538.     RET
  539. BCDOT2:    ANI    0FH
  540.     ADI    '0'
  541.     CALL    PUTCHR
  542.     RET
  543.  
  544.  
  545. ;
  546. ; DATEHL converts the value in HL to BCD year, month, day
  547. ;     for use with Z80DOS time stamps.
  548. ;
  549. ; Inputs:    HL contains hex days since December 31, 1977
  550. ;
  551. ; Outputs:    H contains BCD 20th century year
  552. ;        L contains BCD month
  553. ;        A contains BCD day
  554. ;
  555. ;        Zero flag set (Z) and A=0 if invalid date (zero) detected,
  556. ;        Zero flag reset (NZ) and A=0ffh otherwise.
  557.  
  558. ; Converted to 8080 from DATEHL by Carson Wilson who Adapted from B5C-CPM3.INS
  559.  
  560. DateHL:
  561.     MOV    A,H
  562.     ORA    L        ; Test blank date (zero)
  563.     RZ            ; Return Z and A=0 if so
  564.     SHLD    DAYS        ; Save initial value
  565.     MVI    B,78        ; Set years counter
  566. loop:
  567.     call    ckleap
  568.     LXI    D,-365        ; Set up for subtract
  569.     JNZ    NOLPY        ; Skip if no leap year
  570.     DCX    D        ; Set for leap year
  571. nolpy:
  572.     DAD    D        ; Subtract
  573.     JNC    YDONE        ; Continue if years done
  574.     MOV    A,H
  575.     ORA    L
  576.     JZ    YDONE
  577.     SHLD    DAYS        ; Else save days count
  578.     INR    B        ; Increment years count
  579.     JMP    LOOP        ; And do again
  580. ;
  581. ; The years are now finished, the years count is in 'B' (HL is invalid)
  582. ;
  583. ydone:
  584.     MOV    A,B
  585.     call    binbcd
  586.     STA    YEARS        ; save BCD year
  587. ;
  588.     call    ckleap        ; Check if leap year
  589.     MVI    A,-28
  590.     JNZ    FEBNO        ; February not 29 days
  591.     MVI    A,-29        ; Leap year
  592. febno:
  593.     STA    FEB        ; Set february
  594.     LHLD    DAYS        ; Get days count
  595.     LXI    D,MTABLE    ; Point to months table
  596.     MVI    B,0FFH        ; Set up 'B' for subtract
  597.     MVI    A,0        ; Set a for # of months
  598. mloop:
  599.     PUSH    PSW
  600.     LDAX    D        ; Get month
  601.     MOV    C,A        ; Put in 'C' for subtract
  602.     POP    PSW
  603.     SHLD    DAYS        ; save days count
  604.     DAD    B        ; Subtract
  605.     INX    D        ; Increment months counter
  606.     INR    A
  607.     JC    MLOOP        ; Loop for next month
  608.  
  609. ;
  610. ; The months are finished, days count is on stack.  First, calculate
  611. ; month.
  612. ;
  613. mdone:
  614.     MOV    B,A        ; Save months
  615.     LHLD    DAYS
  616.     MOV    A,H
  617.     ORA    L
  618.     JNZ    NZD
  619.     DCX    D
  620.     DCX    D
  621.     LDAX    D
  622.     CMA
  623.     INR    A
  624.     MOV    L,A
  625.     DCR    B
  626. nzd:
  627.     MOV    A,L        ; Retrieve binary day of month
  628.     call    binbcd        ; Convert to BCD
  629.     PUSH    PSW        ; Save day in A
  630. ;
  631.     MOV    A,B        ; Retrieve the binary month
  632.     call    binbcd        ; Convert binary month to BCD
  633.     MOV    L,A        ; Return month in L
  634. ;
  635.     LDA    YEARS
  636.     MOV    H,A        ; Return year in H
  637. ;
  638.     POP    PSW        ; Restore day
  639.     ORA    A        ; Set NZ flag
  640.     ret
  641.  
  642. ;
  643. ; Support Routines:
  644. ;
  645.  
  646. ;
  647. ; Check for leap years.
  648. ;
  649. ckleap:
  650.     MOV    A,B
  651.     ANI    0FCH
  652.     CMP    B
  653.     ret
  654. ;
  655. ; Convert A to BCD & store back in A
  656. ;
  657. BinBCD:
  658.     ORA    A
  659.     RZ
  660.     PUSH    B
  661.     MOV    B,A
  662.     XRA    A
  663. BinBCD1:
  664.     ADI    1
  665.     daa
  666.     DCR    B
  667.     JNZ    BINBCD1
  668.     POP    B
  669.     ret
  670. ;
  671. ; Buffers:
  672. ;
  673.  
  674. ;
  675. ; Months table
  676. ;
  677. mtable:
  678.     db    -31        ;January
  679. feb:
  680.     db    -28        ;February
  681.     db    -31,-30,-31,-30    ;Mar-Jun
  682.     db    -31,-31,-30    ;Jul-Sep
  683.     db    -31,-30,-31    ;Oct-Dec
  684.  
  685. DAYARY:
  686.     DW    SAT,SUN,MON,TUE,WED,THU,FRI
  687. SAT:    DB    'Saturday  $'
  688. SUN:    DB    'Sunday  $'
  689. MON:    DB    'Monday  $'
  690. TUE:    DB    'Tuesday  $'
  691. WED:    DB    'Wednesday  $'
  692. THU:    DB    'Thursday  $'
  693. FRI:    DB    'Friday  $'
  694.  
  695. MONARY:
  696.     DW    0,JAN,FEBU,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCTO,NOV,DECE
  697. JAN:    DB    'January $'
  698. FEBU:    DB    'Febuary $'
  699. MAR:    DB    'March $'
  700. APR:    DB    'April $'
  701. MAY:    DB    'MAY $'
  702. JUN:    DB    'June $'
  703. JUL:    DB    'July $'
  704. AUG:    DB    'August $'
  705. SEP:    DB    'September $'
  706. OCTO:    DB    'October $'
  707. NOV:    DB    'November $'
  708. DECE:    DB    'December $'
  709.  
  710. AMPM:    DB    ' AM','$'
  711.  
  712. SUPR:    DB    0
  713. ;
  714. ; Messages and Error statements
  715. ;
  716. ERRMS1:    DB    ' $'
  717. ERRMS2:    DB    'Error$'
  718. ERRTAG:    DB    ' ->$'
  719. MESS0:    DB    ', 19$'
  720.  
  721. JDAY:    DS    2
  722. HOURS:    DB    0
  723. MINUTES:    
  724.     DB    0
  725. SECONDS:
  726.     DB    0
  727. DAYS:    ds    2
  728. YEARS:    ds    1
  729. YEARS1:    DS    1
  730. MONTHS:    DS    1
  731. DAYS1:    DS    1
  732.  
  733.     DS    40
  734. STACK    EQU    $
  735.     END
  736. 
  737.