annotate osdep/lrmi.h @ 14416:1836c64997f6

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