Mail Archives: djgpp-workers/2001/08/05/06:35:06
Could someone else please check to see if the problem with setting a file's
tiome occurs on their Windows 2000 or XP.
> > I may have found another low level problem with Win2000, this time with
> > utime.
>
> Another known problem which wasn't fully debugged yet.
I just searched the mail archives fro the last year and didn't spot any
messages. Has this been previously discussed?
> > The output from my testing and the modified touch source is included
below.
> > On Win98 the r.x.flags return 0x3002. The data from Win98 meachine is:
> > fildes = 5
> > dostime = 32358
> > date = 11013
> >
> > As you can see the PC's are not in time sync, but the time still appears
to
> > be valid. I modifed the utime in the test to see if the Windows 9x LFN
> > 0x5705 returned a correct result, but it also failed.
>
> What is missing from the debugging printf's is the value of regs.x.ax
> immediately after the call to functions 5701h and 5705h. Please tell
> what these values are: that's the error code returned by Windows 2000,
> and without knowing what it is, it is next to impossible to guess what
> might be the problem here.
>
I added printing of AX after the int21 call and the results are included
below, it appears that the function 5701h / 5705h / 5707h are not supported.
I also tested AX=5707 and it also failed with a value in ax of 0x0001 and
flags = 0x0003.
After looking at Ralph Brown interrupt list and doing some searching I
wonder if there is something missing as it seems strange for these functions
not to be supported under Windows 2000.
Any ideas on what to look for or at next with this issue?
Windows 2000 results with ax register:
seconds after the minute [0-60] = 39, minutes after the hour [0-59] = 26,
hours since midnight [0-23] = 18
day of the month [1-31] = 5, months since January [0-11] = 7, years
since 1900 = 101
days since Sunday [0-6] = 0, days since January 1 [0-365] = 216,
Daylight Savings Time flag = 0
offset from GMT in seconds = 36000, timezone abbreviation = EST
dostime = 37715
dosdate = 11013
Line 79 r.x.flags = 0x0003, r.x.ax = 0x0001
utime.c 83
utime.c 89
fildes = 5
dostime = 37715
dosdate = 11013
Line 107 r.x.flags = 0x0003, r.x.ax = 0x0001
Win98 ax is the same as it was before the call.
Ralph Browns info from INTERRUP.G to save time in looking it up:
--------D-215700-----------------------------
INT 21 - DOS 2+ - GET FILE'S LAST-WRITTEN DATE AND TIME
AX = 5700h
BX = file handle
Return: CF clear if successful
CX = file's time (see #01665)
DX = file's date (see #01666)
CF set on error
AX = error code (01h,06h) (see #01680)
Note: under DR DOS 3.41 and 5.0, this function returns 0 (no date/time)
for
character devices; MS-DOS returns date and time of opening
SeeAlso: AX=5701h,AX=5704h"Windows95"
Bitfields for file time:
Bit(s) Description (Table 01665)
15-11 hours (0-23)
10-5 minutes
4-0 seconds/2
Bitfields for file date:
Bit(s) Description (Table 01666)
15-9 year - 1980
8-5 month
4-0 day
--------D-215701-----------------------------
INT 21 - DOS 2+ - SET FILE'S LAST-WRITTEN DATE AND TIME
AX = 5701h
BX = file handle
CX = new time (see #01665)
DX = new date (see #01666)
Return: CF clear if successful
CF set on error
AX = error code (01h,06h) (see #01680)
SeeAlso: AX=5700h,AX=5705h"Windows95",AX=5707h"Windows95"
--------D-215702-----------------------------
(Table 01680)
Values for DOS extended error code:
---DOS 2.0+ ---
00h (0) no error
01h (1) function number invalid
02h (2) file not found
Andrew
- Raw text -