home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntutl95.lzh
/
MNTUTL95
/
MINTVERS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
657b
|
50 lines
#include <osbind.h>
/*
* get MiNT version number
*/
int mint;
static void
getMiNT()
{
long *cookie;
cookie = *((long **) 0x5a0);
if (!cookie)
mint = 0;
else {
while (*cookie) {
if (*cookie == 0x4d694e54L) {
mint = cookie[1];
return;
}
cookie += 2;
}
}
mint = 0;
}
int
main(argc, argv)
int argc;
char **argv;
{
int minvers, majvers;
Supexec(getMiNT);
majvers = (mint&0xff00) >> 8;
minvers = (mint&0x00ff);
if (argc < 2) {
if (mint != 0) {
printf("MiNT version %d.%d\n", majvers, minvers);
}
else {
printf("MiNT is not active\n");
}
}
exit(mint);
}