Atari ST series Technical Reference Manual page 115

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

GEMDOS Device I/O and Process Control
and date, while the XBIOS functions get or set both at once.
The DOS dock and IKBD clock are not necessarily the same,
although in later versions of TOS (with ROMs that support
the blitter chip), the DOS clock is reset from IKBD clock at
the termination of each process.
The functions used to get and set the DOS time are
known as Tgettime() and Tsettime(), respectively. These
functions are called as follows:
int time;
time = Tgettim e();
int time;
Tsettime(time);
where time is a 16-bit code that indicates the time to set with
Tsettime(), or the time returned by Tgettime(). In either
case, the meaning of this code is interpreted as follows:
Bit
Number
,
0 -4
Seconds divided by 2
5-10
Minutes
11-15
Hour
Likewise, the DOS functions used to get and set the date
are called Tgetdate() and Tsetdate():
int date;
date = Tgetdate();
int date;
Tsetdate(date);
where date is a 16-bit code that specifies the date to set with
Tsetdate(), or the date read with Tgetdate(). The meaning
of this code is:
Bit Number
0 -4
5 -8
9-15
* Year value is added to 1980 to get current year.
Since the format of the time and date information
stamped on disk files is the same as the above, you can use
the code provided in the program GDIR.C in Chapter 6 as an
example of how to extract the various fields of information
from their bit-packed storage format.
Description
Description
Range
Day
1-31
Month
1-12
Year
0-119*
Range
0-29
0-59
0-23
107

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents