home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / bye5 / b5-clock.lbr / B5C-KCT.IQS / B5C-KCT.INS
Encoding:
Text File  |  1986-03-09  |  1.8 KB  |  53 lines

  1. ;
  2. ; B5C-KCT1.INS
  3. ;  07/17/85        A TIME insert for BYE500 and up
  4. ;            Wayne Masters
  5. ;            Potpourri, 408-378-7474
  6. ;
  7. ;  This insert is for the Z80 piggyback clock chip from:
  8. ;    Kenmore Computer Technology
  9. ;    20 Londers Rd.
  10. ;    Kenmore, N.Y.
  11. ;    (716) 877-0617
  12. ;
  13. ; If your computer uses a Z80 chip and does not have a clock
  14. ; then this is the clock for you.  It installs in minutes.
  15. ; Just remove your Z80 chip, install this chip and reinstall
  16. ; your Z80 on top.  Use an external program to initialize this
  17. ; clock prior to loading BYE.  (See Z-TIMEn.LBR for this initialization
  18. ; program).
  19. ;
  20. ;
  21. ;  RTCBUF will have HH, MM, SS, YY, YY, MM, DD as BCD values (see label)
  22. ;  CCMIN is address for storing current minutes in binary
  23. ;  CCHOUR is address for current hour in binary.
  24. ;
  25. ;***********************************************************************
  26. ZPORT    EQU    0E0H        ; Board shipped with this as default address
  27.                 ; Change address if you change address jumpers
  28. CENTURY    EQU    019H        ; Change this in year 2000
  29. ;
  30. TIME:    IN    ZPORT+2        ; Seconds
  31.     STA    RTCBUF+2
  32.     IN    ZPORT+3        ; Get BCD value for minutes
  33.     STA    RTCBUF+1
  34.     CALL    BCDBIN        ; Convert BCD minutes to binary
  35.     STA    CCMIN        ; Update the current minute
  36.     IN    ZPORT+4        ; Get BCD value for hour
  37.     STA    RTCBUF
  38.     CALL    BCDBIN        ; Convert BCD hour to binary
  39.     STA    CCHOUR        ; Update the current hour
  40.     IN    ZPORT+6        ; Day of month
  41.     STA    RTCBUF+6
  42.     IN    ZPORT+7        ; Month of year
  43.     STA    RTCBUF+5
  44.     IN    ZPORT+9        ; Year of century
  45.     STA    RTCBUF+4
  46.     MVI    A,CENTURY    ; Set to 19 now
  47.     STA    RTCBUF+3
  48.     RET            ; Return
  49. ;
  50. ;  End of TIME routine for BYE500 and up.
  51. ;------------------------------------------------------------------------
  52. ;
  53.