Last change
on this file since 161 was
49,
checked in by Sam Hocevar, 15 years ago
|
- Imported original public domain release, for future reference.
|
File size:
1.0 KB
|
Line | |
---|
1 | #ifndef __EMM_H_ |
---|
2 | #define __EMM_H_ |
---|
3 | #include "system.h" |
---|
4 | #ifdef __DOS // this stuff is DOS specific, don't include |
---|
5 | // on other systems |
---|
6 | #include "linked.hpp" |
---|
7 | |
---|
8 | class emblock : public linked_node |
---|
9 | { |
---|
10 | public : |
---|
11 | unsigned beg,end; |
---|
12 | int emhandle; |
---|
13 | emblock *nextblk; |
---|
14 | } ; |
---|
15 | |
---|
16 | |
---|
17 | class expandedmm |
---|
18 | { |
---|
19 | public : |
---|
20 | unsigned frame_ad; |
---|
21 | long frmsz; |
---|
22 | linked_list allocblks,freeblks; |
---|
23 | expandedmm(); |
---|
24 | |
---|
25 | emblock *alloc(unsigned size); |
---|
26 | void free(emblock *block); |
---|
27 | void free_all(); |
---|
28 | long avail() { return frmsz; } |
---|
29 | void set(emblock *block, char *dat); |
---|
30 | void get(emblock *block, char *dat); |
---|
31 | ~expandedmm() { free_all(); } |
---|
32 | } ; |
---|
33 | |
---|
34 | extern expandedmm epmem; |
---|
35 | extern int emm_avail; |
---|
36 | int EMM_detect(); |
---|
37 | int EMM_num_free_pages(); |
---|
38 | int EMM_version(); |
---|
39 | int EMM_num_active_handles(); |
---|
40 | long EMM_free_memory(); |
---|
41 | int EMM_alloc(int pages); // remeber pages are 16K, 16384 bytes |
---|
42 | // returns handle or -1 |
---|
43 | int EMM_free(int handle); // returns true for success |
---|
44 | unsigned EMM_frame_address(); |
---|
45 | void EMM_map_page(int handle); |
---|
46 | |
---|
47 | #endif |
---|
48 | #endif |
---|
49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.