}\r
}\r
\r
-void main(int argc, char *argv[])\r
+int main(int argc, char *argv[])\r
{\r
byte *pEmmData;
int hEData;
printf("EMS pages available are %lu\n", EMMCoreLeft());
printf("Map 1st 4 pages\n");\r
- MapEMM(hEData, 0, EMMCoreLeft(/*4*/)-2); // load 1st 4 pages into page frame: 0-3\r
+ MapEMM(hEData, 0, EMMCoreLeft(/*4*/)); // load 1st 4 pages into page frame: 0-3\r
//memset(pEmmData, 0x0e, 64000u);
- memset(pEmmData, atoi(argv[1]), 64000u);
+ memset(pEmmData, atoi(argv[1]), ((EMMCoreLeft())*EMMPAGESIZE));
//---- UnmapEMM(hEData, 0, 4); // not absolutely necessary
printf("*pEmmData=%c\n", *pEmmData);
\r
- printf("Map next 2 pages\n");\r
- MapEMM(hEData, EMMCoreLeft(/*4*/)-2, EMMCoreLeft(/*2*/)); // map last 2 pages: 4-5\r
- memset(pEmmData, 0x0e, 32768u);
+ //printf("Map next 2 pages\n");\r
+ //MapEMM(hEData, EMMCoreLeft(/*4*/)-3, EMMCoreLeft(/*2*/)-1); // map last 2 pages: 4-5\r
+ //memset(pEmmData, 0x04, 32768u);
// memset(pEmmData, atoi(argv[0]), 32768u);
- printf("*pEmmData=%c\n", *pEmmData);
+ //printf("*pEmmData=%c\n", *pEmmData);
// printf("*pEmmData++=%c\n", *(pEmmData++));
/*MapEMM(hEData0, 0, 1);
CloseEMM();
printf("after EMS *pEmmData=%x\n", *pEmmData);
printf("EMS pages available are %lu\n", EMMCoreLeft());
+ printf("EMMPAGESIZE=%d\n", EMMPAGESIZE);
+ return 0;
}\r