Mail Archives: djgpp/1996/07/27/15:00:08
dbarrett AT news-server DOT engin DOT umich DOT edu (David M Barrett) wrote:
>Ok, I admit it: I've just recently started experimented with DJGPP. But,
>I have searched long and hard for documentation describing how to set the
>computer into Protected Mode with the Flat Memory option but have been
>unsuccessful.
The whole point of DJGPP is that you don't need to set the processor
into protmode. DJGPP does it for you - almost invisibly!
> Could someone please point me to a tutorial or something
>(or describe the process) to do this:
>1. Set the computer into PM with Flat addressing
>2. Allocate a simple "char Array[1024*1024]" (for example)
>3. Dynamically allocate memory in large chunks.
#include <alloc.h>
int main() {
static char Array[1024*1024];
char *block = malloc(1024*1024*10); /*10 megs enough for you?*/
free(block);
return 0;
}
Happy???
>I've looked around a bit through the DPMI functions, but I don't
>understand the difference between them. Could someone please explain
>them to me? Thanks!
Oh, don't worry about 'em, unless you want to write low level
interfaces...
>-David :)
ABW
--
I have become... Comfortably numb...
Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.hardcafe.co.uk/Alaric/">http://www.hardcafe.co.uk/Alaric/</A>
- Raw text -