Subversion Repositories shark

Rev

Rev 80 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
54 pj 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
*/
12
 
13
#ifndef LRMI_H
14
#define LRMI_H
15
 
16
struct LRMI_regs
17
        {
18
        unsigned int edi;
19
        unsigned int esi;
20
        unsigned int ebp;
21
        unsigned int reserved;
22
        unsigned int ebx;
23
        unsigned int edx;
24
        unsigned int ecx;
25
        unsigned int eax;
26
        unsigned short int flags;
27
        unsigned short int es;
28
        unsigned short int ds;
29
        unsigned short int fs;
30
        unsigned short int gs;
31
        unsigned short int ip;
32
        unsigned short int cs;
33
        unsigned short int sp;
34
        unsigned short int ss;
35
        };
36
 
37
 
38
#ifndef LRMI_PREFIX
39
#define LRMI_PREFIX __svgalib_LRMI_
40
#endif
41
 
42
#define LRMI_CONCAT2(a, b)      a ## b
43
#define LRMI_CONCAT(a, b)       LRMI_CONCAT2(a, b)
44
#define LRMI_MAKENAME(a)        LRMI_CONCAT(LRMI_PREFIX, a)
45
 
46
/*
132 giacomo 47
 Initialize
48
 returns 1 if sucessful, 0 for failure
49
*/
50
#define LRMI_init LRMI_MAKENAME(init)
51
int
52
LRMI_init(void);
53
 
54
/*
55
 Simulate a 16 bit far call
56
 returns 1 if sucessful, 0 for failure
57
*/
58
#define LRMI_call LRMI_MAKENAME(call)
59
int
60
LRMI_call(struct LRMI_regs *r);
61
 
62
/*
54 pj 63
 Simulate a 16 bit interrupt
64
 returns 1 if sucessful, 0 for failure
65
*/
66
#define LRMI_int LRMI_MAKENAME(int)
67
int
68
LRMI_int(int interrupt, struct LRMI_regs *r);
69
 
132 giacomo 70
/*
71
 Allocate real mode memory
72
 The returned block is paragraph (16 byte) aligned
73
*/
74
#define LRMI_alloc_real LRMI_MAKENAME(alloc_real)
75
void *
76
LRMI_alloc_real(int size);
80 pj 77
 
132 giacomo 78
/*
79
 Free real mode memory
80
*/
81
#define LRMI_free_real LRMI_MAKENAME(free_real)
82
void
83
LRMI_free_real(void *m,int size);
84
 
54 pj 85
#endif