4 #include "src\lib\ems.c"
\r
6 Test function for the EMM routines
\r
18 printf("Expanded memory is not present\n");
\r
24 printf("Expanded memory manager is not present\n");
\r
31 printf("Expanded memory manager error\n");
\r
34 printf("There are %ld pages available\n",avail);
\r
36 /* Request 10 pages of expanded memory */
\r
37 if((emmhandle = emmalloc(avail)) < 0)
\r
39 printf("Insufficient pages available\n");
\r
43 for (i = 0; i < avail; i++)
\r
45 sprintf(teststr,"%02d This is a test string\n",i);
\r
46 emmmap(emmhandle,i,0);
\r
47 emmmove(0,teststr,strlen(teststr) + 1);
\r
50 for (i = 0; i < avail; i++)
\r
52 emmmap(emmhandle,i,0);
\r
53 emmget(0,teststr,strlen(teststr) + 1);
\r
54 printf("READING BLOCK %d: %s\n",i,teststr);
\r
57 emmclose(emmhandle);
\r