2
$Id: dpmi.inc,v 1.3 2002/09/07 16:01:18 peter Exp $
4
This file is part of the Free Pascal run time library.
5
Copyright (c) 1999-2000 by the Free Pascal development team
7
See the file COPYING.FPC, included in this distribution,
8
for details about the copyright.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
**********************************************************************}
16
TDPMIRegisters = record
17
EDI, ESI, EBP, Reserved, EBX, EDX, ECX, EAX : longint;
18
Flags, ES, DS, FS, GS, IP, CS, SP, SS : word;
23
Procedure RealIntr(IntNo : word; var Regs:TDPMIRegisters); assembler;
24
(*********************************************************************)
25
(* PROCEDURE RealModeInt(IntNo: word; Var Regs: TDPMIRegisters) *)
26
(* Calls the DPMI server to switch to real mode and call the *)
27
(* real mode interrupt. ALL MEMORY REGISTERS (if used) SHOULD *)
28
(* contain REAL MODE ADRESSES! *)
29
(* IntNo -> Real mode interrupt to call (0-255) *)
30
(* Regs -> Registers to pass on to interrupt. *)
31
(* (ALL UNUSED REGISTERS SHOULD BE SET TO 0 ON ENTRY!) *)
32
(*********************************************************************)
34
PUSH BP { Save BP, just in case }
35
MOV BX,IntNo { Move the Interrupt number into BX }
36
XOR CX,CX { Clear CX }
37
LES DI,Regs { Load the registers into ES:DI }
38
MOV AX,$300 { Set function number to 300h }
39
INT $31 { Call Interrupt 31h - DPMI Services }
40
JC @Exit { Jump to exit on carry }
41
XOR AX,AX { Clear AX }
48
Revision 1.3 2002/09/07 16:01:18 peter
49
* old logs removed and tabs fixed