Topic : The GFA-Basic Compendium
Author : GFA Systemtechnik GmbH
Version : GFABasic.HYP v2.98 (12/31/2023)
Subject : Documentation/Programming
Nodes : 899
Index Size : 28056
HCP-Version : 3
Compiled on : Atari
@charset : atarist
@lang :
@default : Document not found
@help : Help
@options : +g -i -s +z
@width : 75
@hostname : STRNGSRV
@hostname : CAB
@hostname : HIGHWIRE
@hostname : THING
View Ref-File---------------------------------------------------------------------------
- GFA-BASIC Interpreter/Compiler-Patcher -
- Version 1.07 -
---------------------------------------------------------------------------
- Compiler & Library-Patches by -
- Christoph Conrad, Adalbertsteinweg 113, D-52070 Aachen -
- eMail: Christoph_Conrad@AC3.maus.de -
- -
- Interpreter-Patches and GEM interface by -
- Gregor Duchalski, Baueracker 15a, D-44627 Herne -
- eMail: Gregor_Duchalski@DO.maus.ruhr.de -
- -
- A big thank you for the English translation of GFA_PTCH -
- and this documentation goes to *The System ST Team* -
- - 1/14/2021 (fixed typos) -
---------------------------------------------------------------------------
The program enclosed provides a convenient method of making useful patches
to the GFA-BASIC 3.x interpreter and compiler.
At the start, select the Basic interpreter or compiler (GFA_BCOM.PRG).
After that you will be taken to the settings dialog box.
Something in advance: Please take care not to save the patched program(s)
under the same name as the original(s). We accept no responsibility for the
functionality of the patches, anyone who damages his own interpreter and
does not have a backup, only has himself to blame!
----------------------------------------------------------------------------
Patching the compiler
----------------------------------------------------------------------------
Two changes can be made to the compiler or to the library:
- Insertion of an improved INIT section
- A bug fix for the crash under Mag!X
Both patches can be made individually or in one go. The Mag!X patch only
changes the GFA_BCOM.PRG file, the INIT patch also updates the library.
In the patch dialog box, you can enter the new names that should be used to
save the compiler and the library. If necessary, you can also use the
original library again in case the preset name is not correct.
----------------------------------------------------------------------------
Patching the compiler 1: New INIT section
----------------------------------------------------------------------------
You can get precise information about the new INIT section by reading the
text file LIBPATCH.TXT. The listing ERR.LST contains some examples of
how to use the new features.
Important: The LIBPATCH folder _must_ contain the files HIDEM.O, INIT35.O
and INIT36.O!
Clicking on 'Patch' will start the automatic patching procedure. At the
end, you should try to create a new index file (GFA3BLIB.NDX) using the
program MAKE_NDX.PRG. This program (you should have received this with the
original package containing the compiler) will search first in the original
library folder and then in the folder LIBPATCH. If this fails, the file can
still be chosen using the file selector. If this also fails, then the
program will terminate. You should be aware that in this instance you will
have to create an NDX file 'by hand'. If you can avoid this situation, so
much the better.
Hint: If you do not have the MAKE_NDX.PRG program, you can obtain this from
GFA Systemtechnik (good luck with that) or send your original diskette and
a stamped, addressed return mailer to G. Duchalski and the adress mentioned
above.
---------------------------------------------------------------------------
Patching the compiler II: MAG!X bugfix
---------------------------------------------------------------------------
The compiler crashes under Mag!X with the message "Memory block destroyed".
This is the cause:
The compiler uses MShrink (GEMDOS 74) to reduce its memory requirement as
necessary. Using Malloc (GEMDOS 72) it then checks for the largest
available memory block and allocates this amount less 16 Kbytes.
Unfortunately, the program assumes from this that the allocated memory lies
directly after the area previously shrunk. In general this is true. Under
Mag!X, it lies before the allocated memory block (the address that was
returned by MAlloc) which is indeed the so-called MCB, 'Memory Control
Block'.
This contains
- An identifier ('ANDR' or 'KROM' a greeting to one of the programmers
- The length of the allocated block
- The base page address of the program, to which the block belongs
- A pointer to the last MCB.
The GFA compiler overwrites the MCB. After the compiler terminates, Mag!X
checks whether the chain of MCBs is still intact and then reports the error
described.
By the way: This problem also occurs under MultiTOS. However, in this case
it can be removed by simply setting the memory protection flags in the
program header to GLOBAL.
Through the use of the patch, the GFA compiler no longer uses the first
16 bytes lying after the MShrink memory block and therefore dose not
overwrite an MCB. The behavior of the compiler remains nevertheless
incorrect, so that the area allocated does not unconditionally lie after
that which is still in use by the compiler (although as a rule this is
true).
----------------------------------------------------------------------------
Patching the interpreter
----------------------------------------------------------------------------
This provides either practical configuration patches, as documented
by GFA or the correction of errors.
Interpreters that can be patched:
Version: File length:
3.6TT 104770
104766
104739
104597 (English version)
3.5E 103510
103337 (English version)
3.50 102519
102523
3.07 92894
What will be patched in the interpreter?
- No more LINEA calls:
Also see LIBPATCH.TXT. When moving the mouse in the editor you may get
some residual images, but not while a program is running.
- No more SETCOLOR calls, that change the colors on the TT:
GFA Basic make some errors with the internal setting and querying of the
screen colors, so that in resolutions like TT Medium, some colors are
changed after running the interpreter. This patch prevents this. Also
the command SETCOLOR will no longer have an effect. The better command
VSETCOLOR should be used as a replacement.
Hint: Please take note that additional patches made to the editor colors
in conjunction with the SETCOLOR patch will have no effect either!
- MERGE will no longer abort when ASCII 4 is encountered within the text:
The interpreter normally aborts the merging of files at the
corresponding line when it encounters ASCII 4 (EOT == End of trans-
mission, CONTROL D, left arrow). Under UNIX, ASCII 4 is the EOF
character which was one of the greatest ambitions of GFA Systemtechnik.
This patch removes this disrupting behavior.
- CALL bug removed:
The CALL command in interpreter version 3.6 D TT with a size of 104770
bytes does not work because of a typing error (movem.l a4/a6,-(sp)
instead of movem.l a4-a6,-(sp)). The patch repairs this command.
- Free system memory:
When starting, the interpreter reserves all available memory for itself
apart from 16 Kbytes. This is especially a problem on non-TT machines
since too little memory is available for accessories and they refuse to
work. This patch allows you to set the amount of memory that will remain
free (e.g. 32Kbytes).
- Activate 'New names':
The 'New names' option from the Basic's system menu will
be activated automatically.
- The DEFLIST preset
- The editor colors
Hint: These do not work when the 'No more SETCOLOR calls' is active at
the same time.
- The default variable type can be entered without Postfix.
This is preset to Float.
- No CLS when strating program
Patching is basically simple: Once you have selected the patches you
require, select the "Patch.." button. The patched version of the
interpreter will then be saved under a new name.
----------------------------------------------------------------------------
Version history
----------------------------------------------------------------------------
Vers. Date
24.07.93 - First version released. And shortly afterwards, I added
the numbering of versions. :-)
0.90ß 26.07.93 - MERGE patch for V 3.50 of the interpreter incorporated.
- The default variable type of the interpreter loaded
will be read and displayed.
- Patches for later versions expanded.
0.91ß 27.07.93 - No more 'mouse droppings' with the file selector
- Compiler patch support started.
0.92ß 29.07.93 - DEFFILL patch incorporated, its action was wrongly
documented.
- GFA_BCOM.PRG now longer has an evaluation table
appended. All of the data necessary is now incorporated
directly within the file.
01.08.93 - The compiler was wrongly patched.
0.93 08.08.93 - Library patches integrated.
0.94 13.08.93 - Call to the MAKE_NDX program was incorrect.
- MERGE patch for the 3.5E Interpreter incorporated.
- Instruction reworked.
0.95 19.08.93 - Remaining patches incorporated: Line-A and SETCOLOR
suppression for Version 3.07.
- DEFFILL patch expanded to a value of 8.
- Documents reworked again.
0.96 28.08.93 - 3.6 Interpreter with 104739 Bytes now supported.
- Line-A patch for 3.07 doesn't work.
0.97 27.09.93 - 3.6 Interpreter with 104766 Bytes now supported.
0.98 29.09.93 - Modifications for the MAG!X-Compiler patch begun.
02.10.93 - MAG!X-patch incorporated completely.
04.10.93 - A brief information dialog now appears when the program
is started.
0.99 23.01.94 - New INIT section. The old one contained an error in
conjunction with floating point variables.
- The program no longer uses LINEA.
1.00 07.02.94 - The SETCOLOR patch did not work with V3.50 of the
interpreter.
- An additional patch has been added: The size of the
memory which remains free after starting the program can
be changed. The default is 16 Kbytes the least that is
practical when using accessories e.g. (ERGO!help).
- 3D effects under MultiTOS and Mag!X were incorrect.
- If SHIFT, CONTROL or ALTERNATE is pressed when starting
the program, the info dialog no longer appears. The file
selector appears instead.
1.01 10.04.94 - The LINEA patch for the interpreter with 102523 Bytes
was incorrect.
- The memory patch would only work on the ST until the
next RESERVE call occurred. This was then reset to 16
KB.
15.04.94 - A successful patch operation is now confirmed with an
appropriate message.
1.02 15.05.94 - The SETCOLOR patch for V3.5 of the interpreter with
102519 Bytes did not work (Andre Muller).
- Since the editor colors patch does not work at the same
time as SETCOLOR suppression, the corresponding option
will be diabled (David Reitter).
1.03 20.07.94 - A few internal changes, some further security checks
were added and some adaptions for the new English
version.
- The 'Patch...' button will be disabled if no patch
is chosen for the interpreter.
1.04 11.08.94 - Included support for English 3.6 interpreter
(104597 bytes).
1.05 29.08.94 - 'New names' patch included.
1.06 07.09.94 - Included support for English 3.5E interpreter
(103337 bytes), thanx to Bob Samuel.
1.07 05.10.94 -Included support for French 3.6TT interpreter
(104740 bytes).
-ERR.LST and the new FILESELECT replacement can
be found in the LISTINGS directory.
22.10.94 -'Patch...' was not selectable if only one of the
last three patches was chosen.
---------------------------------------------------------------------------
Status and disclaimer
---------------------------------------------------------------------------
GFA_PTCH is freeware and can be freely distributed so long as the contents
of the original archive remains complete. The commercial use of this
program is prohibited. The distribution by PD vendors is allowed provided
that the fee charged does not exceed DM 10.-.
We accept no responsibility for the functionality of the patches, anyone
who damages his hard- or software by using GFA_PTCH and does not have a
backup only has himself to blame!
The newest version of this program can always be found in the Maus DO.
If you have any suggestions for additional patches or have a Basic version
that is not supported, we would be pleased to here from you.
Have fun
Gregor Duchalski & Christoph Conrad
--------------------------------------------------------------------------