Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileFdatime() GEMDOSSyntaxLONG Fdatime( timeptr, handle, flag )
DATETIME *timeptr;
WORD handle, flag;
Function Fdatime() reads or modifies a file's time and date stamp.
Opcode 87 (0x57)
Availability All GEMDOSversions.
Parameters timeptr is a pointer to a DATETIME structure which is
represented below. handle is a valid GEMDOS file handle to
the file to modify. flag is FD_INQUIRE (0) to fill timeptr
with the file's date/timestamp and FD_SET (1) to change the
file's date/timestamp to the contents of timeptr.
typedef struct
{
unsigned hour:5;
unsigned minute:6;
unsigned second:5;
unsigned year:7;
unsigned month:4;
unsigned day:5;
} DATETIME;
Binding move.w flag,-(sp)
move.w handle,-(sp)
pea timeptr
move.w #$57,-(sp)
trap #1
lea 10(sp),sp
Return Value Fdatime() returns a 0 if the date/time was successfully
read/modified. Otherwise, it returns a negative GEMDOS error
code.
Caveats GEMDOSversions below 0.15 yielded very unpredictable
results with this call and should therefore be avoided.
Comments timeptr.second should be multiplied times two to obtain the
actual value. timeptr.year is expressed as an offset from
1980.