GEOS is a system that has been developed to be shared as closely as possible between the two Commodore computers, the 64 and 128. In most cases, when an application works with GEOS 64, it will work with GEOS 128 in 40 column mode. But, once in a while, an application will show up that can only be run on a specific machine or in a specific mode, such as a 128 in 80 column mode. There is a byte in a file's header block that will identify the type of computer that it is allowed or was designed to be run on. That byte can be found at fileHeader+96 when the file's header block is loaded in at fileHeader. There is a geoSHELL routine for checking if a file is compatible with the computer or the current mode it is in. That routine is CkModeFlag. Refer to the documentation on this routine for more info on how to use it.
For manual checking of this byte, here is a listing of the possible values and their meaning:
$00 = 40 column only - 128 or 64
$20 = 128 - 40 column only
$40 = All modes allowed
$60 = 128 only - 40 or 80 columns
$80 = 64 only
$c0 = 128 - 80 column only
If the current mode of the computer does not match or is not compatible with this byte, then geoSHELL will not execute a file that the user is trying to run. For the same token, if your command is being written specifically for a particular machine or mode, then be sure to include the correct byte in the header file of your command.
While your command is executing, if you need to check the type of computer or mode, then just test the variable 'screenmode' for this information. Here are the possible variations of this variable:
#%10000000 = 128 in 80 column mode
#%00000000 = 128 in 40 column mode
#%01000000 = 64
In addition to this, the variable 'videomode' will tell you if the RGB mode of the 80 column screen has been selected. Bit 7 will reflect this. This can be set even if the computer is in 40 column mode. That way, when the user switches to 80 column mode, it will be put into RGB (color) mode.
When manually placing text or graphics on the screen, it is not a good idea to use the lower portion of the screen below scanline 176 since geoSHELL allows a 16K video ram equipped 128 to operate in color mode. You will notice that none of the standard functions in geoSHELL do anything in this lower area. Even the mouse is prevented from entering this area. So, keep this in mind unless the machine is not in color mode. But that would prevent your command from being used by those who like
using geoSHELL's color on the 80 column screen.
The geoSHELL Programmer's Development Package C-PAGE
L routine for checking if a fil
using geoSHELL's color on the 80 column screen.
The geoSHELL Programmer's Development Package C-PAGE
L routine for checking if a file is compatible with the computer or the current mo
The geoSHELL Programmer's Development Package C-PAGE