Allocating 64k of memory in DOS

Started by
9 comments, last by NuffSaid 23 years, 10 months ago
There is an easy answer to this question. Just use a 32-bit DOS extender, such as the one PharLap software used to make (called 386/DOS Extender SDK. I have a copy on my shelf from years ago.).

A DOS extender effectively lets you write 32 bit applications that run in the protected mode of 386 and higher processors. You have a full flat memory model up to 4GB and you have no problem allocating 64,000 bytes. The extender is basically a stub program, based in 16-bit mode, that switches the processor to protected mode, loads the application into flat memory, then calls a function in the main application to start it running. The memory footprint of the extender is small and there is a mechanism to share a fragment of memory with a 16-bit TSR if necessary (say, for video driver access).

Back in 1990-92 I was working on a 3D scientific visualization package called Reveal which worked with PharLap''s toolkit. We were able to allocate and use a full 8MB of RAM (all we had at the time) for our software. We actually had a full graphics pipeline, with gouraud shading and a 16-bit Z-buffer running under this system.

Don''t know if PharLap''s DOS extender is still available. It might be. Check out www.provantage.com or www.pparadise.com.

I would imagine that you can find a freeware/shareware DOS extender at this time. I''d bet that there is someone out there still using them.

You might have to do some research to figure out how to link applications to the DOS extender that were built with a modern compiler. We used a specialized compiler back then, since Borland and Microsoft were still 16-bit. I think Microway had a compiler that worked with the PharLap extender. I don''t remember all the details.... Hell, something like Borland 4.5 or GNU might actually work. There may even be a DOS extender under the GNU public license.

Graham


Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
email: grhodes@sed.ara.com
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement