mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 18:19:54 +02:00
+ implemented dos.GetIntVec and SetIntVec for i8086-msdos
git-svn-id: trunk@24720 -
This commit is contained in:
parent
cb81153cc4
commit
896d2f2bd5
@ -134,8 +134,8 @@ Procedure SetVerify(verify: boolean);
|
||||
|
||||
{Do Nothing Functions}
|
||||
Procedure SwapVectors;
|
||||
Procedure GetIntVec(intno: byte; var vector: pointer);
|
||||
Procedure SetIntVec(intno: byte; vector: pointer);
|
||||
Procedure GetIntVec(intno: byte; var vector: {$ifdef i8086}farpointer{$else}pointer{$endif});
|
||||
Procedure SetIntVec(intno: byte; vector: {$ifdef i8086}farpointer{$else}pointer{$endif});
|
||||
Procedure Keep(exitcode: word);
|
||||
|
||||
{Additional (non-TP) function for quick access to system timer - for FV etc.}
|
||||
|
@ -14,6 +14,7 @@
|
||||
**********************************************************************}
|
||||
|
||||
{$inline on}
|
||||
{$asmmode intel}
|
||||
|
||||
unit dos;
|
||||
|
||||
@ -86,6 +87,8 @@ type
|
||||
{$DEFINE HAS_SETVERIFY}
|
||||
{$DEFINE HAS_GETVERIFY}
|
||||
{$DEFINE HAS_SWAPVECTORS}
|
||||
{$DEFINE HAS_GETINTVEC}
|
||||
{$DEFINE HAS_SETINTVEC}
|
||||
{$DEFINE HAS_GETSHORTNAME}
|
||||
{$DEFINE HAS_GETLONGNAME}
|
||||
|
||||
@ -925,6 +928,32 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{******************************************************************************
|
||||
--- Get/SetIntVec ---
|
||||
******************************************************************************}
|
||||
|
||||
procedure GetIntVec(intno: Byte; var vector: farpointer); assembler;
|
||||
asm
|
||||
mov al, intno
|
||||
mov ah, 35h
|
||||
int 21h
|
||||
xchg ax, bx
|
||||
mov bx, vector
|
||||
mov [bx], ax
|
||||
mov ax, es
|
||||
mov [bx + 2], ax
|
||||
end;
|
||||
|
||||
procedure SetIntVec(intno: Byte; vector: farpointer); assembler;
|
||||
asm
|
||||
push ds
|
||||
mov al, intno
|
||||
mov ah, 25h
|
||||
lds dx, word [vector]
|
||||
int 21h
|
||||
pop ds
|
||||
end;
|
||||
|
||||
{$ifdef DEBUG_LFN}
|
||||
begin
|
||||
LogLFN:=(GetEnv('LOGLFN')<>'');
|
||||
|
Loading…
Reference in New Issue
Block a user