~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to rtl/go32v2/dpmi.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{
2
 
    $Id: dpmi.inc,v 1.3 2002/09/07 16:01:18 peter Exp $
3
 
 
4
 
    This file is part of the Free Pascal run time library.
5
 
    Copyright (c) 1999-2000 by the Free Pascal development team
6
 
 
7
 
    See the file COPYING.FPC, included in this distribution,
8
 
    for details about the copyright.
9
 
 
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.
13
 
 
14
 
 **********************************************************************}
15
 
TYPE
16
 
     TDPMIRegisters = record
17
 
       EDI, ESI, EBP, Reserved, EBX, EDX, ECX, EAX : longint;
18
 
       Flags, ES, DS, FS, GS, IP, CS, SP, SS : word;
19
 
     end;
20
 
 
21
 
 
22
 
 
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
 
(*********************************************************************)
33
 
asm
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 }
42
 
    @Exit:                                                      { Exit label }
43
 
    POP BP                                                      { Restore BP }
44
 
  end;
45
 
 
46
 
{
47
 
  $Log: dpmi.inc,v $
48
 
  Revision 1.3  2002/09/07 16:01:18  peter
49
 
    * old logs removed and tabs fixed
50
 
 
51
 
}