|
|
1.1 ! root 1: /* clock.h 4.1 11/9/80 */ ! 2: ! 3: /* ! 4: * VAX clock registers ! 5: */ ! 6: ! 7: #define ICCS_RUN 0x1 ! 8: #define ICCS_TRANS 0x10 ! 9: #define ICCS_SS 0x20 ! 10: #define ICCS_IE 0x40 ! 11: #define ICCS_INT 0x80 ! 12: #define ICCS_ERR 0x80000000 ! 13: ! 14: #define SECDAY ((unsigned)(24*60*60)) /* seconds per day */ ! 15: #define SECYR ((unsigned)(365*SECDAY)) /* per common year */ ! 16: /* ! 17: * TODRZERO is the what the TODR should contain when the ``year'' begins. ! 18: * The TODR should always contain a number between 0 and SECYR+SECDAY. ! 19: */ ! 20: #define TODRZERO ((unsigned)(1<<28)) ! 21: ! 22: #define YRREF 1970 ! 23: #define LEAPYEAR(year) ((year)%4==0 && year != 2000) /* good till 2100 */ ! 24: ! 25: /* ! 26: * Start a 60 HZ clock. ! 27: */ ! 28: #define clkstart() {\ ! 29: mtpr(NICR, -16667); /* 16.667 milli-seconds */\ ! 30: mtpr(ICCS, ICCS_RUN+ICCS_IE+ICCS_TRANS+ICCS_INT+ICCS_ERR);\ ! 31: } ! 32: #define clkreld() mtpr(ICCS, ICCS_RUN+ICCS_IE+ICCS_INT+ICCS_ERR) ! 33: ! 34: #define clkwrap() (((unsigned)mfpr(TODR) - TODRZERO)/100 > SECYR+SECDAY)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.