+ implemented dos.GetIntVec and SetIntVec for i8086-msdos

git-svn-id: trunk@24720 -
This commit is contained in:
nickysn 2013-06-01 14:32:03 +00:00
parent cb81153cc4
commit 896d2f2bd5
2 changed files with 31 additions and 2 deletions

View File

@ -134,8 +134,8 @@ Procedure SetVerify(verify: boolean);
{Do Nothing Functions} {Do Nothing Functions}
Procedure SwapVectors; Procedure SwapVectors;
Procedure GetIntVec(intno: byte; var vector: pointer); Procedure GetIntVec(intno: byte; var vector: {$ifdef i8086}farpointer{$else}pointer{$endif});
Procedure SetIntVec(intno: byte; vector: pointer); Procedure SetIntVec(intno: byte; vector: {$ifdef i8086}farpointer{$else}pointer{$endif});
Procedure Keep(exitcode: word); Procedure Keep(exitcode: word);
{Additional (non-TP) function for quick access to system timer - for FV etc.} {Additional (non-TP) function for quick access to system timer - for FV etc.}

View File

@ -14,6 +14,7 @@
**********************************************************************} **********************************************************************}
{$inline on} {$inline on}
{$asmmode intel}
unit dos; unit dos;
@ -86,6 +87,8 @@ type
{$DEFINE HAS_SETVERIFY} {$DEFINE HAS_SETVERIFY}
{$DEFINE HAS_GETVERIFY} {$DEFINE HAS_GETVERIFY}
{$DEFINE HAS_SWAPVECTORS} {$DEFINE HAS_SWAPVECTORS}
{$DEFINE HAS_GETINTVEC}
{$DEFINE HAS_SETINTVEC}
{$DEFINE HAS_GETSHORTNAME} {$DEFINE HAS_GETSHORTNAME}
{$DEFINE HAS_GETLONGNAME} {$DEFINE HAS_GETLONGNAME}
@ -925,6 +928,32 @@ begin
end; end;
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} {$ifdef DEBUG_LFN}
begin begin
LogLFN:=(GetEnv('LOGLFN')<>''); LogLFN:=(GetEnv('LOGLFN')<>'');