posixc.library: refactor __exec_do to make clear separate between regular code path...
[AROS.git] / test / inquire.c
blobebbec0e4f26dae7d0e5a58c5e3c15d782649ef41
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 ULONG relMajor, relMinor, vers;
25 ULONG kickbase, kicksize;
26 UWORD kickver, kickrev;
27 STRPTR variant;
29 if(!(ArosBase = OpenLibrary(AROSLIBNAME, AROSLIBVERSION)))
31 printf ("Couldn't open "AROSLIBNAME"\n");
32 return RETURN_FAIL;
35 if(AROSLIBREVISION > ArosBase->lib_Revision)
37 CloseLibrary(ArosBase);
38 printf (AROSLIBNAME" is too old! Need at least version %d.%d\n",
39 AROSLIBVERSION, AROSLIBREVISION);
40 return RETURN_FAIL;
43 ArosInquire (
44 AI_ArosVersion, (IPTR) &vers,
45 AI_ArosReleaseMajor, (IPTR) &relMajor,
46 AI_ArosReleaseMinor, (IPTR) &relMinor,
47 AI_KickstartBase, (IPTR) &kickbase,
48 AI_KickstartSize, (IPTR) &kicksize,
49 AI_KickstartVersion, (IPTR) &kickver,
50 AI_KickstartRevision, (IPTR) &kickrev,
51 AI_ArosVariant, (IPTR) &variant,
52 TAG_DONE);
54 printf ("AROS release = %ld.%ld\n", (long)relMajor, (long)relMinor);
55 printf ("AROS module major version = V%ld\n", (long)vers);
56 printf ("AROS Variant = %s\n", variant);
58 if (kicksize)
60 printf("Kickstart base address = $%lx\n", (long)kickbase);
62 printf("Kickstart size = $%lx (%ld kB)\n", (long)kicksize, (long)kicksize/1024);
64 printf("Kickstart version = %d.%d\n", (int)kickver, (int)kickrev);
66 else
68 printf("This machine has no Kickstart ROM.\n");
71 CloseLibrary(ArosBase);
73 return 0;