home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
borland
/
jnfb88.arc
/
GETCPU.ARC
/
WHATCPU.C
< prev
next >
Wrap
Text File
|
1987-09-21
|
812b
|
28 lines
/* --------------------------------------------------------------- */
/* 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 */
}