Atari ST series Technical Reference Manual page 49

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

XBIOS Device and System Functions
point that it is entered, the address of the packet buffer will
be on the stack, and in register AO.
It should not spend more than one millisecond handling
the interrupt (most of the time, it will just move the packet
information to your own buffer), and should end with an
RTS instruction. Your routine should begin by saving all reg­
isters that you will use, and restore those registers before
ending. Remember also that if you replace one of the vectors
used by the system (mousevec, clockvec, or ikbdsys), you
must either duplicate its actions in your own handler, or lose
system-level functions (like mouse or keyboard support).
Whenever you replace one of these vectors, always save their
original contents, so that you can restore them before your
program ends.
For more information on the various Intelligent Key­
board Controller packet types, see Appendix I.
One common type of I/O carried on with the IKBD is
getting and setting the keyboard's time and date clock. The
XBIOS provides functions that make it easy to get or set the
clock. These functions are Settime() and Gettime():
long datetime;
Settime(datetime);
long datetime;
datetime = GettimeO;
where datetime is a 32-bit value that specifies the date and
time in DOS format. The bit groupings for datetime are:
Table 3-6. datetime Bit Groupings
Bit Number
0 -4
Seconds divided by 2
5 -10
Minutes
11-15
Hour
16-20
Day
21-24
Month
25-31
Year
* Year value is added to 1980 to arrive at current year.
For example, if Gettime() returns a value of $0F976723, you
could find the date and time by breaking the number down
into its binary equivalent:
Description
Range
0-29
0-59
0-23
1-31
1-12
0-119*
41

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents