Mercurial > mplayer.hg
comparison linux/lrmi.h @ 2212:f0f681ef92ff
LRMI import
author | nick |
---|---|
date | Mon, 15 Oct 2001 16:59:35 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2211:720bf2e5c408 | 2212:f0f681ef92ff |
---|---|
1 /* | |
2 Linux Real Mode Interface - A library of DPMI-like functions for Linux. | |
3 | |
4 Copyright (C) 1998 by Josh Vanderhoof | |
5 | |
6 You are free to distribute and modify this file, as long as you | |
7 do not remove this copyright notice and clearly label modified | |
8 versions as being modified. | |
9 | |
10 This software has NO WARRANTY. Use it at your own risk. | |
11 Original location: http://cvs.debian.org/lrmi/ | |
12 */ | |
13 | |
14 #ifndef LRMI_H | |
15 #define LRMI_H | |
16 | |
17 struct LRMI_regs | |
18 { | |
19 unsigned int edi; | |
20 unsigned int esi; | |
21 unsigned int ebp; | |
22 unsigned int reserved; | |
23 unsigned int ebx; | |
24 unsigned int edx; | |
25 unsigned int ecx; | |
26 unsigned int eax; | |
27 unsigned short int flags; | |
28 unsigned short int es; | |
29 unsigned short int ds; | |
30 unsigned short int fs; | |
31 unsigned short int gs; | |
32 unsigned short int ip; | |
33 unsigned short int cs; | |
34 unsigned short int sp; | |
35 unsigned short int ss; | |
36 }; | |
37 | |
38 | |
39 #ifndef LRMI_PREFIX | |
40 #define LRMI_PREFIX LRMI_ | |
41 #endif | |
42 | |
43 #define LRMI_CONCAT2(a, b) a ## b | |
44 #define LRMI_CONCAT(a, b) LRMI_CONCAT2(a, b) | |
45 #define LRMI_MAKENAME(a) LRMI_CONCAT(LRMI_PREFIX, a) | |
46 | |
47 /* | |
48 Initialize | |
49 returns 1 if sucessful, 0 for failure | |
50 */ | |
51 #define LRMI_init LRMI_MAKENAME(init) | |
52 int | |
53 LRMI_init(void); | |
54 | |
55 /* | |
56 Simulate a 16 bit far call | |
57 returns 1 if sucessful, 0 for failure | |
58 */ | |
59 #define LRMI_call LRMI_MAKENAME(call) | |
60 int | |
61 LRMI_call(struct LRMI_regs *r); | |
62 | |
63 /* | |
64 Simulate a 16 bit interrupt | |
65 returns 1 if sucessful, 0 for failure | |
66 */ | |
67 #define LRMI_int LRMI_MAKENAME(int) | |
68 int | |
69 LRMI_int(int interrupt, struct LRMI_regs *r); | |
70 | |
71 /* | |
72 Allocate real mode memory | |
73 The returned block is paragraph (16 byte) aligned | |
74 */ | |
75 #define LRMI_alloc_real LRMI_MAKENAME(alloc_real) | |
76 void * | |
77 LRMI_alloc_real(int size); | |
78 | |
79 /* | |
80 Free real mode memory | |
81 */ | |
82 #define LRMI_free_real LRMI_MAKENAME(free_real) | |
83 void | |
84 LRMI_free_real(void *m); | |
85 | |
86 #endif |