#pragma warn -use\r
\r
//file load or read definition\r
-#define FILERL\r
//#define FILEREAD\r
+//#define EXMMVERBOSE\r
\r
#define PRINTBB { printf("&main()= %Fp\n", argv[0]);printf("bigbuffer= %Fp\n", bigbuffer);printf("&bigbuffer= %Fp\n", &bigbuffer);printf("bigbuffer= %04x\n", bigbuffer);printf("&bigbuffer= %04x\n", &bigbuffer); }\r
\r
#endif\r
memptr bigbuffer;\r
\r
-#ifdef FILERL\r
//static byte bakapee[64];\r
char *bakapee;\r
word baka;\r
-#endif\r
\r
#ifdef __BORLANDC__\r
argc=argc;\r
#endif\r
-#ifdef FILERL\r
bakapee = malloc(64);\r
-#endif\r
gvar.mm.mmstarted=0;\r
\r
//PRINTBB\r
-#ifdef FILERL\r
if(argv[1]) bakapee = argv[1];\r
else\r
//{ printf("filename!: "); scanf("%[^\n]", &bakapee); }\r
bakapee = "data/koishi~.pcx";\r
-#endif\r
\r
// printf("main()=%Fp start MM\n", *argv[0]);\r
MM_Startup(&gvar.mm, &gvar.mmi);\r
PRINTBB;\r
// printf("press any key to continue!\n");\r
// getch();\r
-#ifdef FILERL\r
+\r
// bakapeehandle = open(bakapee,O_RDONLY | O_BINARY, S_IREAD);\r
// printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));\r
// if(CA_FarRead(bakapeehandle,(void far *)&bigbuffer,sizeof(bigbuffer),&gvar.mm))\r
#ifdef __WATCOMC__\r
printf("\nsize of big buffer~=%u\n", _bmsize(sega, bigbuffer));\r
#endif\r
-#endif\r
+\r
printf("contents of the buffer\n[\n%s\n]\n", bigbuffer);\r
//printf("dark purple = purgable\n");\r
//printf("medium blue = non purgable\n");\r
MM_Report(&gvar);\r
printf("press any key to continue!\n");\r
getch();\r
-#ifdef FILERL\r
MM_FreePtr(&bigbuffer, &gvar.mm);\r
-#endif\r
//PM_Shutdown();\r
CA_Shutdown(&gvar);\r
MM_Shutdown(&gvar.mm);\r
-#ifdef FILERL\r
free(bakapee);\r
if(baka) printf("\nyay!\n");\r
else printf("\npoo!\n");\r
-#endif\r
printf("========================================\n");\r
printf("near= %Fp ", gvar.mm.nearheap);\r
printf("far= %Fp", gvar.mm.farheap);\r