home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1035 / cmos.h < prev    next >
C/C++ Source or Header  |  1990-12-28  |  2KB  |  59 lines

  1. /* uportid = "@(#)cmos.h    Microport Rev Id  1.3.7 8/11/86"
  2.  * $Header: cmos.h,v 1.2 87/09/16 02:12:08 root Exp $
  3.  * 
  4.  * The layout of cmos for the IBM AT. See pps 1-45 to 1-55 of
  5.  * the IBM Technical Reference Manual.
  6.  */
  7.  
  8. #ifndef CMOS_H
  9. #define CMOS_H
  10.  
  11. #define    CMOSSIZE    0x40            /* # of bytes in cmos    */
  12. #define    CMOSDEV        "/dev/cmos"        /* where cmos lives    */
  13.  
  14. typedef struct cmos {                /* the layout of cmos    */
  15.                         /* realtime clock info    */
  16.         unsigned char sec;        /* 0: seconds        */
  17.         unsigned char secalarm;        /* 1: second alarm    */
  18.         unsigned char min;        /* 2: minutes        */
  19.         unsigned char minalarm;        /* 3: minute alarm    */
  20.         unsigned char hours;        /* 4: hours        */
  21.         unsigned char houralarm;    /* 5: hour alarm    */
  22.         unsigned char weekday;        /* 6: day of week    */
  23.         unsigned char monthday;        /* 7: day of month    */
  24.         unsigned char month;        /* 8: month        */
  25.         unsigned char year;        /* 9: year        */
  26.  
  27.                         /* status registers    */
  28.         unsigned char statusa;        /* A: status reg.A    */
  29.         unsigned char statusb;        /* B: status reg.B    */
  30.         unsigned char statusc;        /* C: status reg.C    */
  31.         unsigned char statusd;        /* D: status reg.D    */
  32.         unsigned char diagsts;        /* E: diagnostic status byte*/
  33.         unsigned char shutdown;        /* F: shutdown status byte */
  34.  
  35.                         /* device characteristics */
  36.         unsigned char diskette;        /* 10: floppy drives:A&B*/
  37.         unsigned char res1;        /* 11: unused        */
  38.         unsigned char disk;        /* 12: fixed disk: C & D*/
  39.         unsigned char res2;        /* 13: unused        */
  40.         unsigned char equip;        /* 14: equipment byte    */
  41.         unsigned char lowbase;        /* 15: low base mem byte*/
  42.         unsigned char hibase;        /* 16: hi base mem byte    */
  43.         unsigned char lowexp1;        /* 17: low exp. mem byte*/
  44.         unsigned char hiexp1;        /* 18: hi exp. mem byte */
  45.         unsigned char diskC;        /* 19: disk type ext.: C*/
  46.         unsigned char diskD;        /* 1A: disk type ext.: D*/
  47.         unsigned char res3[18];        /* 1B: unused        */
  48.         unsigned int chksum;        /* 2E-2F: cmos checksum    */
  49.         unsigned char lowexp2;        /* 30: low exp. mem byte*/
  50.         unsigned char hiexp2;        /* 31: hi exp. mem byte */
  51.         unsigned char century;        /* 32: date century byte*/
  52.         unsigned char infoflags;    /* 33: information flags*/
  53.         unsigned char res4[11];        /* 34-3F: unused    */
  54. } cmos_t;
  55.  
  56. /* The actual declaration of a variable does NOT belong in this file! */
  57. #endif /* CMOS_H */
  58.  
  59.