CLOCK$ I/O Structure
Programs can open the CLOCK$ device (via DOS fn 3dH) and use fn 3fH (read
file) to read the system time or fn 40H (write to file) to change it.
The format of all reads and writes to this device is a 6-byte (48-bit)
binary value indicating the number of milliseconds since January 1, 1980.
1000 milliseconds = 1 second; highest value is (2^48)-1 or 8915.7 years.
ClockIORec
Offset Size Contents
▀▀▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
+0 2 wLowMs least significant word (bits 0-15)
+2 2 wMidMs middle word (bits 16-31)
+4 2 wHighMs most significant word (bits 32-47)
6 Size of ClockIORec
Writing to CLOCK$ changes all parts of the structure. It is much more
sensible to use DOS fns 2bH (set date) and 2dH (set time), which perform
the same task, but without the headaches.
See Also: Device Drivers
Device Attribute
Device Requests
-♦-