home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / bye3 / b3c-kct.iqs / B3C-KCT.INS
Text File  |  1985-11-17  |  2KB  |  53 lines

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