i never had any luck with "SEGMENT AT" on older versions of MASM
haven't tried it on newer versions
BIODATA SEGMENT AT 4OH ;BIOS data area
ORG 17H
KBSTAT DB ? ;Keyboard status byte
BIODATA ENDSbut, all you really need is the 40h and the offset of 17h
you can do that with EQUates
as for the clock TSR, i wrote something similar, but as a device driver
CLOCK$ is the actual DOS device name - a character device
by doing it that way, it automatically comes up with the right date and time
no need for the DATE/TIME commands
if you set the DOS date or time with DATE/TIME, the driver sets the RTC
i see the CLOCK$ device doesn't seem to be supported under win32 :P
To allow a clock board to be integrated into the system for TIME and DATE,
the CLOCK$ device is used. This device defines and performs functions like any
other character device (most functions will be reset done bit, reset error bit,
and return). When a read or write to this device occurs, 6 bytes are
transferred. The first 2 bytes are a word, which is the count of days since
01-01-80. The third byte is minutes, the fourth is hours, the fifth is
hundredths of a second, and the sixth is seconds.
of course, the RTC boards used in XT's varied
so - you had to write the I/O stuff to match your board - lol
for an AT-class machine, it is standardized at 70h/71h
EDIT: the device name for CLOCK$ is "CLOCK$ ", and the attribute is 8008h