|
|
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.
4 responses total.
Found a couple of DOS tools that just might do the trick. XMSSIZE.EXE (run as a Device= right after the HIMEM line) changes the amount of memory listed in Himem's data, along with a third party Ramdrive program with some extra features. I'll give these a try.
Simtel has several ramdrive programs, at least one of which includes source code that might be worth a look if you decide to write your own.
or you could just switch to linux or any other modern os.
I've got it worked out now. (And I do have a linux partition.)
Response not possible - You must register and login before posting.
|
|
- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss