home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C128CPM / SGTOOL13.ARC / CIA.ARC / CIATODG.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-28  |  401 b   |  23 lines

  1. /*
  2. SG C Tools 1.3
  3.  
  4. (C) 1993 Steve Goldsmith
  5. All Rights Reserved
  6.  
  7. Compiled with HI-TECH C 3.09 (CP/M-80).
  8. */
  9.  
  10. #include <sys.h>
  11. #include <hitech.h>
  12. #include <cia.h>
  13.  
  14. /* get cia time of day clock */
  15.  
  16. void gettodcia (ushort C, uchar *TOD)
  17. {
  18.   TOD[0] = inp(C+ciaTODHrs); /* c = cia chip addr */
  19.   TOD[1] = inp(C+ciaTODMin);
  20.   TOD[2] = inp(C+ciaTODSec);
  21.   TOD[3] = inp(C+ciaTODTen);
  22. }
  23.