Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!widener!ukma!rex!uflorida!gatech!ncar!asuvax!cs.utexas.edu!rutgers!cbmvax!mks From: mks@cbmvax.commodore.com (Michael Sinz) Newsgroups: comp.sys.amiga.programmer Subject: Re: Getting Kickstart version Message-ID: <22496@cbmvax.commodore.com> Date: 17 Jun 91 13:21:13 GMT References: <3646@sirius.ucs.adelaide.edu.au> Reply-To: mks@cbmvax.commodore.com (Michael Sinz) Organization: Commodore, West Chester, PA Lines: 57 In article <3646@sirius.ucs.adelaide.edu.au> jpotter@ucs.adelaide.edu.au (Jonathan Potter) writes: >How do I find out what version of Kickstart is running, in an OS friendly way? >Under 1.3, location $fc000c contains it, but this doesn't work under 2.0. > >Please mail replies if you can help. Thanks. Well, from the source code to workbench, here is what I do: (Oh, it does not work in 1.3 but does in 2.0 so you should check if exec is V36 or better first...) /* * AboutWorkbench * * This routine puts up the requester when About is selected... */ void AboutWorkbench(void) { struct Library *lib; struct EasyStruct es = {sizeof(struct EasyStruct),NULL,SystemWorkbenchName,NULL,NULL}; ULONG args[11]; args[6]=~0; args[7]=0; if (lib = (struct Library *)OPENLIBRARY("version.library", 0)) { args[6] = lib->lib_Version; args[7] = lib->lib_Revision; CLOSELIBRARY(lib); } es.es_TextFormat=VersionFormat; es.es_GadgetFormat=Quote(Q_OK_TEXT); args[0]=(ULONG)KickstartName; args[1]=args[5]=(ULONG)Quote(Q_VERSION_TITLE); args[2]=SysBase->lib_Version; /* Kickstart version */ /* This next line only works if args[2] >= 36 */ args[3]=((struct ExecBase *)SysBase)->SoftVer; /* Kickstart revision */ args[4]=(ULONG)SystemWorkbenchName; /* args[5]=args[1]; */ /* args[6]=version */ /* args[7]=revision */ args[8]=(ULONG)Copyright; args[9]=(ULONG)Copyright2; args[10]=(ULONG)Copyright3; EasyRequestArgs(WbBASE->wb_BackWindow,&es,NULL,args); } -- Mike /----------------------------------------------------------------------\ | /// Michael Sinz - Amiga Software Engineer | | /// Operating System Development Group | | /// BIX: msinz UUNET: rutgers!cbmvax!mks | |\\\/// Programming is like sex: | | \XX/ One mistake and you have to support it for life. | \----------------------------------------------------------------------/