GFA BASIC TIPS & TRICKS by Richard Karsmakers
Since there haven't been much problems lately, you'll notice that
this article isn't really big this time. But those that actually
occured weren't too difficult to answer.
The problems that reached me in this issue were:
1) How do I make sure that an item selector box doesn't destroy
my whole screen when activated in low res?
Answer: The only way to do this, is to buffer the screen and put
it back on the proper place again after the fileselector is de-
2) I use several screens in my program, located on different
locations in memory. I swap between them using the XBIOS
function number 5. But now and then, my screens get messed up and
menu bars that I use are scrambled after switching. What must I
Answer: Your program probably uses the same space as that are
used by GfA Basic to store variables, or to buffer certain
operations. This can be avoided by starting your program with the
In most cases, this line leaves enough space (150 Kb) for Basic.
If not, just increase or decrease the number.
3) How do I calculate length of a string that will contain a
piece of the screen taken by GET, before it is taken?
Typing in the following program (on the next page) will give the
result. The coördinates are specified by the variables X1, Y1, X2
and Y2. The last line is included to check the accuracy.
X%=Xbios(4) !Get res
If X%=0 !Low res
X=4 !4 bit planes
If X%=1 !Med res
X=2 !2 bit planes
Else !High res
X=1 !1 bit plane
X1=0 !Coordinates are here (can vary)
4) Is there a way to make files readable again that are saved
with the help of the 'PSAVE' command?
Answer: Yes, there is! It is quite a complicated thing to do, ans
I was just trying to find it out (together with Frank Lemmen)
when an acquaintance of mine had me copy one of his PD disks
containing a "PSAVE REVERSE" program. The listing is contained on
this ST NEWS disk, contained in the folder "PROGRAMS".
5) How do use the ST Basic (uugh!) command LPRINT USING in GfA
Answer: Since I do not have a printer myself, I am not sure the
solution I give will be full-proof. But I think you'll have to
add one of the lines
OPEN "O",#1,"LST:" !For Centronics
OPEN "O",#1,"AUX:" !For RS232
before you start printing. The actual printing would have to be
After printing, you'll need to close the channel again by adding
There also were some problems that I could not solve. Maybe you,
our reader, can help out.
1) How do I perform communication with modem or such in GfA?
2) How do I change the shape of the cursor (not the mousecursor)?
G.A.J. van Oene
That was it for today! I only hope someone will find an answer
some time to my VDIBASE problem (see the "Questions & Answers"
column of this issue)!
The text of the articles is identical to the originals like they appeared in old ST NEWS issues. Please take into consideration that the author(s) was (were) a lot younger and less responsible back then. So bad jokes, bad English, youthful arrogance, insults, bravura, over-crediting and tastelessness should be taken with at least a grain of salt. Any contact and/or payment information, as well as deadlines/release dates of any kind should be regarded as outdated. Due to the fact that these pages are not actually contained in an Atari executable here, references to scroll texts, featured demo screens and hidden articles may also be irrelevant.