X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Ffmemtest.c;h=2cdbadd09c05a850db3cdd5de26e250c497b97d1;hb=465a28bde642141b8221a5217373e5f7c844e6c6;hp=8301279964d18b3ea04f64f9e83a8b2391e54b2b;hpb=e0335fc72d6856ec3df7a081281ebd8f36e3981d;p=16.git diff --git a/src/fmemtest.c b/src/fmemtest.c old mode 100644 new mode 100755 index 83012799..2cdbadd0 --- a/src/fmemtest.c +++ b/src/fmemtest.c @@ -19,8 +19,11 @@ * Fifth Floor, Boston, MA 02110-1301 USA. * */ - #include +#include "src/lib/16_head.h" +#include "src/lib/16_ca.h" +#include "src/lib/16_mm.h" +#include "src/lib/types.h" void main(int argc, char *argv[]) @@ -28,7 +31,17 @@ main(int argc, char *argv[]) int x=420; int huge *ptr=&x; int *ptr0=&x; + //void __based(__self) *pee; + memptr pee; + void __near *npee; + void __far *fpee; + void *dpee; + __segment segu; + //word csw=0,dsw=0,esw=0,ssw=0,ipw=0; + _nheapgrow(); + _fheapgrow(); + _heapgrow(); //ptr=&x; printf("&main()=%Fp\n", *argv[0]); printf("ptr0=%Fp\n", ptr0); @@ -40,4 +53,26 @@ main(int argc, char *argv[]) printf("address of *ptr=%Fp\n", *ptr); printf("&x=%Fp\n", &x); printf("x=%d\n", x); + printf("\n"); + /*__asm + { + //lea csw,cs + //lds DS,dsw + //les ES,esw +// mov ss,ssw +// mov ip,ipw + }*/ + //printf("ip=%u\n", ipw); + //printf("ss=%u\n", ssw); + //printf("cs=%u\n", csw); + //printf("ds=%u\n", dsw); + //printf("es=%u\n", esw); + printf("memavl=%u\n", _memavl()); + printf("size of based pee~=%u %FP\n", _bmsize(segu, pee), pee); + printf("size of default pee~=%u %FP\n", _msize(dpee), dpee); + printf("size of near pee~=%u %FP\n", _nmsize(npee), npee); + printf("size of far pee~=%u %FP\n", _fmsize(fpee), fpee); + printf("pee=%Fp\n", pee); + printf("npee=%Fp\n", npee); + printf("&main()=%Fp\n", *argv[0]); }