www.digitalmars.com         C & C++   DMDScript  

c++.dos.16-bits - DOS 64Kb error

reply "Steve & Denise De Chellis" <dbouton snet.net> writes:
Error: C:\DM\HMVG\MAIN.c(1746): segment size is 0x143bd, exceeding 64Kb

I'm writing a DOS RPG character generator program and am getting the above
error when I Build. When I double click on the message it just takes me to
the ending brace in MAIN.

Could someone please tell me what I doing wrong? I realize that I have not
given allot of information to tell what is wrong but all the build files are
around half a meg total.

I've only declared about 1,000 int variables.

If this is some sort of built in limit could someone explain to me what
those limits are?

Steve De Chellis

dungeonmaster snet.net
Jan 16 2002
parent Jan Knepper <jan smartsoft.cc> writes:
In 16 bits DOS memory is 'segmented', i.e. broken up in 64 Kb blocks.
Because of this cute limitation the maximum array (object) size can not exceed
64 Kb.
It seems that in your case you try to put too much code into one segment.
Break the code up in different .c files or try the -Nc switch...

Jan



Steve & Denise De Chellis wrote:

 Error: C:\DM\HMVG\MAIN.c(1746): segment size is 0x143bd, exceeding 64Kb

 I'm writing a DOS RPG character generator program and am getting the above
 error when I Build. When I double click on the message it just takes me to
 the ending brace in MAIN.

 Could someone please tell me what I doing wrong? I realize that I have not
 given allot of information to tell what is wrong but all the build files are
 around half a meg total.

 I've only declared about 1,000 int variables.

 If this is some sort of built in limit could someone explain to me what
 those limits are?

 Steve De Chellis

 dungeonmaster snet.net
Jan 16 2002