Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: doctorq on December 26, 2013, 02:48:54 PM
-
Hi,
I would finally like to fix a small issue I can't seem to find a solution to myself.
My Amiga 500 has a Kickstart 1.3 chip and a SCSI harddrive connected through a GVP controller. I want to keep the Kickstart 1.3 chip installed, and if needed I can softkick to Kickstart 2.0.
I need a script that on boot can determine if it is Kickstart 1.3 or Kickstart 2.0 that is available, and depending on which Kickstart, it should load the correct OS. How can I determine which Kickstart is in use?
I can do a C:Version, but this just gives some text output. How can I store this info to be able to use it in my startup-sequence? What is the best and most efficient way to do the check? What should I check for? Kickstart version, exec.library version?
I was thinking something like this, to do the loading after determining which Kickstart is in use.
IF ??> EQ Kickstart1.3
ELSE
ENDIF
-
version >nil: version 36
if warn
else
endif
Edit: sorry, version version does not work with kick 1.3. Use version exec.library or version dos.library instead. Any library which is located in ROM and not on disk.
Edit2: now I remember the right solution: you just say version 36, but you have to use the 1.3 version of the version command.
So this is correct:
wb13:c/version >nil: 36
if warn
else
endif
-
Thanks Thomas, I'll try it out.
A question though, if you can answer it; what does the 36 in the version command do? Why is it there? I assume it is for setting a number to see if the version output is above or below this number?
-
Workbench version 36 is 1.3. 37 and above are 2.0 or later.
-
Version 36 is 2.0.
33 -> 1.2
34 -> 1.3
36 -> 2.0
37 -> 2.1
39 -> 3.0
40 -> 3.1
44 -> 3.5
45 -> 3.9
50 -> 4.0 (or MorphOS)
The command checks for version 36. If the version found is 36 or above, it returns 0 (OK), if the version is below 36, it returns 5 (WARN).
The return code can be checked by the if command:
5 = WARN
10 = ERROR
20 = FAIL
-
Thanks for the explanation. You say that I have to use the version command from the WB 1.3 disk to get the desired functionality. How do you get the same result with the newer versions of Workbench, with 2.0 for instance?
-
The template for the version command is always the same:
VERSION filename version revision
All arguments are optional. If filename is given, the file is loaded and its version is determined. If version is given, the version found is checked against the given one and the return code is set accordingly. Revision likewise if you need more accurate checking than just the version number.
In 2.0 the command line handling has changed. All commands in 2.0 use the same new function of dos.library to handle arguments while in 1.3 each command has its own code to handle command lines.
The 1.3 version of the version command accepts a number as only argument and uses this as version.
The 2.0 version of the version command treats a single argument always as the file name. If you want to omit the file name and only check for a version, then you have to specify keywords. OTOH the 1.3 version does not accept keywords. That's why there is no common solution.
The command line to check the system's version in 2.0 is what I wrote in my first post:
version version 36
This does not check the version of the version command because 'version' in this case is used as a keyword. If you want to check the version of a file called version you have to enclose the file name in quotation marks so that it is not recognised as key word:
version "version" 36
-
Thanks again for the thorough explanation. I definately learned something new here. Next step is the fun part; trying it out and get it working :)
-
The template for the version command is always the same:
VERSION filename version revision
All arguments are optional. If filename is given, the file is loaded and its version is determined.
I think one addition is that if filename is a library it will give the version of the library in memory and not the on disk file. To override this one has to add the FILE switch to the command.
greets,
Staf.