www.digitalmars.com         C & C++   DMDScript  

c++.dos.32-bits - __SMALL__ defined in flat-model

reply "Gisle Vanem" <giva bgnett.no> writes:
To my surprise I discovered that __SMALL__ is defined for flat-model
(dmc -mx). I find it confusing that it's defined for both real-mode small
model and protected-mode flat model. 

Gisle V.
Jul 03 2002
parent Roland <rv ronetech.com> writes:
Gisle Vanem a écrit :

 To my surprise I discovered that __SMALL__ is defined for flat-model
 (dmc -mx). I find it confusing that it's defined for both real-mode small
 model and protected-mode flat model.

 Gisle V.

In fact DOSX model is NOT a Flat model: it's a 32 bit Small model: code, data and stack are 3 different segments. To know if you are in 16 or 32 bit Small model, test sizeof(int) roland
Jul 03 2002