drew
|
|
DOS Memory above 64MB
|
Nov 12 20:57 UTC 1999 |
MSDOS being what it is, of course has a hard time with the concept of
memory above 64 megabytes. It occurs to me, though, that protected
mode code on a 32 bit processor ought to be able to work with up to
4 gigabytes.
What I am contemplating is writing a new RAMdisk program to make use
of everything above the 64M mark. Since I have 128M in this machine,
it would give me a 64M RAMdrive; with possibility to expand by adding
more physical memory. When activated, the loader should:
1. Switch to Protected mode.
2. Find the *actual* top of memory (not necessarily DOS's conclusion).
3. If this location is at or under 64M, get back to DOS/Real and
print an error message.
4. Otherwise, stick a filesystem in the extra space.
5. Put an appropriate TSR in memory - XMS if possible.
6. Assign the new "drive" a Drive Letter.
7. Intercept the appropriate vectors.
8. Get back to real mode, if this wasn't required earlier.
9. Return to DOS (or the calling program).
The TSR should:
1. Intercept interrupt calls to the other disk I/O.
2. If it's a drive letter other than the RAMdrive, pass on control.
3. Otherwise, determine what the I/O request wants done (block
read, write, sector seek, etc.)
4. Goto protected mode, passing the request and any data
5. Read or write from the super-high memory as appropriate
6. Go back to real mode, passing any required data
7. Chain to the other disk I/O routines as appropriate.
Anyways:
1. Before I unnecessarily waste time on this, has anybody already
done it?
2. Otherwise, where's a good source (web based, preferably) of
information on how to code something like this?
I've found an Int 15h, Function 89h that jumps to Protected mode;
but my programmers reference doesn't give any clues about how to
use it.
|