home *** CD-ROM | disk | FTP | other *** search
-
- /*
- TEST.C: small example C program using PAL.
-
- */
-
- #include <pal.h>
-
-
-
- char *s;
- char **ss;
- char c;
- unsigned i,n;
- unsigned char *video_pointer;
-
-
-
- int main(int argc, char *argv[])
- {
-
- char * system;
-
- *(int*)&video_pointer = 0xA0000 - (int)_zero;
-
-
- /**** display the environment ********/
- /*
- for (i=(ulong)environ ; ; i += sizeof (char *))
- {
- s = *(char **)i;
- if ( *s == 0 ) break;
- printf("%s \n",s);
- }
- */
-
- if (dos32system == 1) system="raw DOS";
- if (dos32system == 2) system="XMS";
- if (dos32system == 4) system="VCPI";
- if (dos32system == 8) system="DPMI";
-
-
- // printf(" %s \n",getenv("COMSPEC"));
-
- printf(" Executable file name %s\n",argv[0]);
- printf(" Executable file size %d bytes\n",exesize);
- printf(" Number of command line args %d\n",argc);
- printf(" System type %s\n",system);
- printf(" DOS32 Version %x.%x%x\n",dos32version >> 8,(dos32version >> 4) & 0xF,dos32version & 0xF);
- printf(" Avalible memory %dK\n",maxavail()>>10);
-
-
-
- printf("\nPress any key to exit\n");
- for (; !kbhit() ;);
-
-
-
-
- return EXIT_SUCCESS;
- }