mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 23:14:02 +02:00
* FileCreate and GetLocalTime fixed
This commit is contained in:
parent
8469f6eb0b
commit
9d6b7fdcc0
@ -47,6 +47,7 @@ const
|
|||||||
ofRead = $0000; {Open for reading}
|
ofRead = $0000; {Open for reading}
|
||||||
ofWrite = $0001; {Open for writing}
|
ofWrite = $0001; {Open for writing}
|
||||||
ofReadWrite = $0002; {Open for reading/writing}
|
ofReadWrite = $0002; {Open for reading/writing}
|
||||||
|
doDenyRW = $0010; {DenyAll (no sharing)}
|
||||||
faCreateNew = $00010000; {Create if file does not exist}
|
faCreateNew = $00010000; {Create if file does not exist}
|
||||||
faOpenReplace = $00040000; {Truncate if file exists}
|
faOpenReplace = $00040000; {Truncate if file exists}
|
||||||
faCreate = $00050000; {Create if file does not exist, truncate otherwise}
|
faCreate = $00050000; {Create if file does not exist, truncate otherwise}
|
||||||
@ -93,7 +94,7 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
asm
|
asm
|
||||||
mov eax, 7F2Bh
|
mov eax, 7F2Bh
|
||||||
mov ecx, ofReadWrite or faCreate
|
mov ecx, ofReadWrite or faCreate or doDenyRW (* Sharing to DenyAll *)
|
||||||
{$IFOPT H+}
|
{$IFOPT H+}
|
||||||
mov edx, FileName
|
mov edx, FileName
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -637,30 +638,29 @@ end;
|
|||||||
{$asmmode intel}
|
{$asmmode intel}
|
||||||
procedure GetLocalTime (var SystemTime: TSystemTime); assembler;
|
procedure GetLocalTime (var SystemTime: TSystemTime); assembler;
|
||||||
asm
|
asm
|
||||||
(* Expects the default record alignment (DWord)!!! *)
|
(* Expects the default record alignment (word)!!! *)
|
||||||
mov ah, 2Ah
|
mov ah, 2Ah
|
||||||
call syscall
|
call syscall
|
||||||
mov edi, SystemTime
|
mov edi, SystemTime
|
||||||
xor eax, eax
|
|
||||||
mov ax, cx
|
mov ax, cx
|
||||||
stosd
|
stosw
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov al, dh
|
|
||||||
stosd
|
|
||||||
mov al, dl
|
mov al, dl
|
||||||
|
shl eax, 16
|
||||||
|
mov al, dh
|
||||||
stosd
|
stosd
|
||||||
push edi
|
push edi
|
||||||
mov ah, 2Ch
|
mov ah, 2Ch
|
||||||
call syscall
|
call syscall
|
||||||
pop edi
|
pop edi
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
|
mov al, cl
|
||||||
|
shl eax, 16
|
||||||
mov al, ch
|
mov al, ch
|
||||||
stosd
|
stosd
|
||||||
mov al, cl
|
|
||||||
stosd
|
|
||||||
mov al, dh
|
|
||||||
stosd
|
|
||||||
mov al, dl
|
mov al, dl
|
||||||
|
shl eax, 16
|
||||||
|
mov al, dh
|
||||||
stosd
|
stosd
|
||||||
end;
|
end;
|
||||||
{$asmmode default}
|
{$asmmode default}
|
||||||
@ -757,7 +757,10 @@ Finalization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 2000-10-15 20:44:18 hajny
|
Revision 1.7 2001-01-13 11:10:59 hajny
|
||||||
|
* FileCreate and GetLocalTime fixed
|
||||||
|
|
||||||
|
Revision 1.6 2000/10/15 20:44:18 hajny
|
||||||
* FindClose correction
|
* FindClose correction
|
||||||
|
|
||||||
Revision 1.5 2000/09/29 21:49:41 jonas
|
Revision 1.5 2000/09/29 21:49:41 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user