home *** CD-ROM | disk | FTP | other *** search
- /* --------------------------------------------------------------- */
- /* WHATCPU.C - Turbo C program to show example of how to use the */
- /* C_GETCPU assembly language module. */
- /* --------------------------------------------------------------- */
-
- #include <stdio.h>
-
- int C_GETCPU();
-
- main()
- {
- int CPU_Type; /* Receives result */
- CPU_Type = C_GETCPU(); /* Call the function */
- printf("Processor is [80"); /* Print common msg */
- switch (CPU_Type) /* Depending on result */
- { /* Print rest of msg */
- case 386: printf("386");
- break;
- case 286: printf("286");
- break;
- case 186: printf("188/186");
- break;
- case 86: printf("88/86");
- break;
- }
- printf("]\n"); /* Terminate msg string */
- }