* warning about SetDate added (TODO)

This commit is contained in:
Tomas Hajny 2000-06-01 18:38:46 +00:00
parent 8a68f96c56
commit 9b8162972f

View File

@ -277,18 +277,23 @@ end;
procedure setftime(var f;time : longint); procedure setftime(var f;time : longint);
begin begin
asm if os_mode = osOS2 then
{Load handle} begin
movl f,%ebx {!!! Must be done differently for OS/2 !!!}
movw (%ebx),%bx end
movl time,%ecx else
shldl $16,%ecx,%edx asm
{Set date} {Load handle}
movw $0x5701,%ax movl f,%ebx
call syscall movw (%ebx),%bx
xorb %ah,%ah movl time,%ecx
movw %ax,doserror shldl $16,%ecx,%edx
end; {Set date}
movw $0x5701,%ax
call syscall
xorb %ah,%ah
movw %ax,doserror
end;
end; end;
procedure msdos(var regs:registers); procedure msdos(var regs:registers);
@ -543,18 +548,22 @@ end;
procedure setdate(year,month,day : word); procedure setdate(year,month,day : word);
begin begin
{DOS only! You cannot change the system date in OS/2!} if os_mode = osOS2 then
asm begin
movw 8(%ebp),%cx {TODO: !!! Must be done differently for OS/2 !!!}
movb 10(%ebp),%dh end
movb 12(%ebp),%dl else
movb $0x2b,%ah asm
call syscall movw 8(%ebp),%cx
movb 10(%ebp),%dh
movb 12(%ebp),%dl
movb $0x2b,%ah
call syscall
(* SetDate isn't supposed to change DosError!!! (* SetDate isn't supposed to change DosError!!!
xorb %ah,%ah xorb %ah,%ah
movw %ax,doserror movw %ax,doserror
*) *)
end; end;
end; end;
procedure gettime(var hour,minute,second,sec100:word); procedure gettime(var hour,minute,second,sec100:word);
@ -1174,7 +1183,10 @@ end;
end. end.
{ {
$Log$ $Log$
Revision 1.25 2000-05-28 18:20:16 hajny Revision 1.26 2000-06-01 18:38:46 hajny
* warning about SetDate added (TODO)
Revision 1.25 2000/05/28 18:20:16 hajny
* DiskFree/DiskSize updated * DiskFree/DiskSize updated
Revision 1.24 2000/05/21 16:06:38 hajny Revision 1.24 2000/05/21 16:06:38 hajny