Install crosstools into its own directory. Tools dir much cleaner now.
[AROS.git] / test / inquire.c
bloba775bbf99581c4aef87572f880d2624f945b364d
1 /*
2 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
3 $Id$
5 Use of aros.library/ArosInquire()
6 */
8 #include <aros/inquire.h>
9 #include <aros/arosbase.h>
10 #include <dos/dos.h>
12 #include <proto/exec.h>
13 #include <proto/dos.h>
14 #include <proto/aros.h>
16 #include <stdio.h>
18 static const char version[]= "$VER: inquire 41.1 (29.3.1997)\n\r";
20 struct Library *ArosBase;
22 int main(int argc, char **argv)
24 int rc;
25 ULONG relMajor, relMinor, vers;
26 ULONG kickbase, kicksize;
27 UWORD kickver, kickrev;
28 STRPTR variant;
30 rc = 0;
32 if(!(ArosBase = OpenLibrary(AROSLIBNAME, AROSLIBVERSION)))
34 printf ("Couldn't open "AROSLIBNAME"\n");
35 return RETURN_FAIL;
38 if(AROSLIBREVISION < ArosBase->lib_Revision)
40 CloseLibrary(ArosBase);
41 printf (AROSLIBNAME" is too old! Need at least version %d.%d\n",
42 AROSLIBVERSION, AROSLIBREVISION);
43 return RETURN_FAIL;
46 ArosInquire (
47 AI_ArosVersion, (IPTR) &vers,
48 AI_ArosReleaseMajor, (IPTR) &relMajor,
49 AI_ArosReleaseMinor, (IPTR) &relMinor,
50 AI_KickstartBase, (IPTR) &kickbase,
51 AI_KickstartSize, (IPTR) &kicksize,
52 AI_KickstartVersion, (IPTR) &kickver,
53 AI_KickstartRevision, (IPTR) &kickrev,
54 AI_ArosVariant, (IPTR) &variant,
55 TAG_DONE);
57 printf ("AROS release = %ld.%ld\n", (long)relMajor, (long)relMinor);
58 printf ("AROS module major version = V%ld\n", (long)vers);
59 printf ("AROS Variant = %s\n", variant);
61 if (kicksize)
63 printf("Kickstart base address = $%lx\n", (long)kickbase);
65 printf("Kickstart size = $%lx (%ld kB)\n", (long)kicksize, (long)kicksize/1024);
67 printf("Kickstart version = %d.%d\n", (int)kickver, (int)kickrev);
69 else
71 printf("This machine has no Kickstart ROM.\n");
74 CloseLibrary(ArosBase);
76 return 0;