DPRG List  

[DPRG] C programming problem, large arrays in 16 bit DOS?

Subject: [DPRG] C programming problem, large arrays in 16 bit DOS?
From: R. Steven Rainwater srainwater at ncc.com
Date: Mon Aug 18 16:35:01 CDT 2003

On Mon, 18 Aug 2003 14:08:06 -0700, Clay Timmons wrote:
>The problem is that I'm using 16 bit DOS (sorry I promise
>to move to Linux once I get those cans!).
>  unsigned char   camera_image[76800];
>This gets an error that the constant is too large.  Anything
>dimensioned above [32767] gets this error.

Wow, it's been a long time but back in the 80's I used work
with the Microsoft C compiler for DOS. It supported several
memory models but always defaulted to one that was way too
small. There were some command line switches you could give
to kick it into other memory models that would allow much
larger arrays. If I remember correctly. You had to use the 
"huge" memory model to get arrays over 64k. Borland probably
has a similar concept.


* R. Steven Rainwater * http://www.ncc.com/humans/srainwater/index.html *
Snake through the chaos with a smooth noodle map. --Devo

More information about the DPRG mailing list