The GFA-Basic Compendium [v2.98 12/31/2023]
Help
Document not found
HYPertext Version
GFA-Basic Addendum
Command line options
Optimizations not covered in the Compiler manual
Cookie Jar
Fastload on TOS 1.00/1.02
GFA-Basic History
The Origins of GFA-Basic
Misc Images
General Information
Patches for GFA-Basic
Known problems with GFA-Basic
Start-up/Shut-down modules
Number Table
Shift Table
N.AES Functions and Objects
Debugging with GFA-Basic and MiNT
C to GFABASIC
GFA-Basic v3 float format
ST-Basic float format
Assembler Notes
Compatibility with GFA-BASIC 3.5
Understanding GFA's VDI scheme
GFA-Basic Editor/Interpreter Manual
GFA_PTCH.TXT
LIBPATCH.TXT
VDIBASE.TXT
ATTRDEF.H
BASEPAGE.H
ERRNO.H
LINEAVAR.H
LINEAEQU.S
The local=FN bug
Using GEMSYS
A Study of VDISYS
VDI Revisited
Optimizing FUNCTION Calls
Assembler and GFABASIC
Compiler Option $M
Compiler Option $P
External Arrays
Structures
Porting other BASICs
GCC Extended Program Header
256 color VDI/Hardware table
Publisher
GFA Software Technologies, Inc.
MichTron, Inc.
Antic Software
Chapter 1 - Introduction
About This Manual
Using GFA-Basic 3 For The First Time
The Editor
The Cursor Keypad
The Numeric Keypad
The Modifier Keys
Further Editing Commands
Further Control Commands
The Menu Bar and Function Keys
Special Commands
DEFWRD
DEFLIST
$
Chapter 2 - Variables and Memory Management
Arrays
DIM
OPTION BASE
ARRAYFILL
Matrix Commands
MAT BASE
MAT CLR
MAT READ
MAT CPY
MAT ADD
MAT ABS
Type Transformation
TYPE
ASC
STR$
VAL
CVI
CINT
Pointer Operations
PEEK
WORD
VARPTR
ABSOLUTE
Deleting and Exchanging
CLEAR
SWAP
QSORT
INSERT
Reserved Variables
PI
SETTIME
_C
Special
LET
VOID
Memory Management
FRE
BMOVE
BASEPAGE
RESERVE
INLINE
MALLOC
Chapter 3 - Operators
Arithmetic Operators
Logical Operators
NOT
AND
OR
XOR
IMP
EQV
Concatenation Operator
Comparison Operators
=
==
<
<>
Assignment Operator
Operator Hierarchy
Chapter 4 - Numerical Functions
Mathematical Functions
ABS
EVEN
INT()
ROUND
MIN
SQR
EXP
SIN
FACT
SCALE
Random Number Generator
RANDOM
Integer Arithmetic
DEC
ADD
PRED
ADD()
Bit Operations
BCLR
SHR
AND()
SWAP()
BYTE()
Chapter 5 - String Manipulation
RIGHT$
MID$
MID$()
PRED()
LEN
INSTR
RINSTR
STRING$
UPPER$
RSET
Chapter 6 - Input and Output
Keyboard and Screen Handling
INKEY$
INPUT
LINE INPUT
FORM INPUT
PRINT
PRINT USING
MODE
DEFNUM
CRSCOL
KEYxxx Commands
KEYPAD
KEYTEST
KEYPRESS
KEYDEF
Data Input and Output
Data Commands
File Management
Directory Handling
DFREE
DIR
FGETDTA
FSFIRST
MKDIR
Files
EXIST
OPEN
CLOSE
NAME
BLOAD
Sequential Access
INP
INPUT$
INPUT #
PRINT #
STORE
SEEK
Random Access
FIELD
RECORD
Communicating with Peripherals
INP()
Serial (RS232) and MIDI Interfaces
Mouse and Joysticks
MOUSE
SETMOUSE
HIDEM
STICK
PADT
LPENX
Printing
HARDCOPY
Sound Generation
SOUND
DMASOUND
MW_OUT
Chapter 7 - Program Structure
Decision Commands
IF
ELSE IF
Multiple Branching
ON GOSUB
SELECT
Loops
FOR
REPEAT
WHILE
DO
DO WHILE
EXIT IF
Procedures and Functions
PROCEDURE
VAR
LOCAL
FUNCTION
DEFFN
Error Handling
ON BREAK
ON ERROR
ERROR
Interrupt Programming
Other Commands
REM
GOTO
DELAY
EDIT
NEW
LOAD
SAVE
LIST
CHAIN
RUN
QUIT
Program Tracing
TRON
TRACE$
DUMP
Chapter 8 - Graphics
Graphics Definition Commands
SETCOLOR
DEFMOUSE
DEFMARK
DEFFILL
BOUNDARY
DEFLINE
DEFTEXT
GRAPHMODE
General Graphics Commands
CLIP
PLOT
SETDRAW
BOX
CIRCLE
POLYLINE
POINT
FILL
CLS
TEXT
SPRITE
CURVE
Grabbing Sections of the Screen
SGET
GET
VSYNC
BITBLT
GETSIZE
Chapter 9 - Event, Menu, and Window Management
ON MENU
MENU()
ON MENU BUTTON
ON MENU KEY
ON MENU IBOX
ON MENU MESSAGE
Pull-down Menus
ON MENU GOSUB
Window Commands
OPENW
W_HAND
CLEARW
WINDTAB
Other Window-related Commands
RC_INTERSECT
RC_COPY
ALERT
FILESELECT
Chapter 10 - System Routines
BIOS, XBIOS, and GEMDOS
W:
Line-A Calls
ACLIP
PSET
PTST
ALINE
HLINE
ARECT
APOLY
ACHAR
ATEXT
BITBLT adr%
L~A
VDI Routines
CONTRL
VDISYS
VDIBASE
WORK_OUT
Special VDI Routines and GDOS
GDOS?
V~H
V_OPNWK
V_OPNVWK
V_CLRWK
VST_LOAD_FONTS
VQT_EXTENT
VQT_NAME
Non-BASIC Routine Calls
C:
MONITOR
CALL
RCALL
EXEC
Other System-related Commands
Chapter 11 - AES Libraries
GEMSYS
Object Structure
Text Data Structure (TEDINFO)
Icon Data Structure (ICONBLK)
Bit Image Block Structure (BITBLK)
Application Block Structure (APPLBLK)
Parameter Block Structure (PARMBLK)
Color Icon Data Structure (CICONBLK)
Color Icon Structure (CICON)
Switch Button Structure (SWINFO)
Pupup Menu Structure (POPINFO)
Application Services Library
appl_control
APPL_EXIT
APPL_FIND
appl_getinfo
APPL_INIT
APPL_READ
appl_search
APPL_TPLAY
APPL_WRITE
appl_yield
_appl_yield
Event Library
EVNT_BUTTON
EVNT_DCLICK
EVNT_KEYBD
EVNT_MESAG
EVNT_MOUSE
EVNT_MULTI
EVNT_TIMER
Menu Library
menu_attach
MENU_BAR
MENU_ICHECK
MENU_IENABLE
menu_istart
menu_popup
MENU_REGISTER
menu_settings
MENU_TEXT
MENU_TNORMAL
Object Library
OBJC_ADD
OBJC_CHANGE
OBJC_DELETE
OBJC_DRAW
OBJC_EDIT
OBJC_FIND
OBJC_OFFSET
OBJC_ORDER
objc_sysvar
objc_xfind
Form Library
FORM_ALERT
FORM_BUTTON
FORM_CENTER
FORM_DIAL
FORM_DO
FORM_ERROR
FORM_KEYBD
form_popup
Graphics Library
GRAF_DRAGBOX
GRAF_GROWBOX
GRAF_HANDLE
GRAF_MKSTATE
GRAF_MOUSE
GRAF_MOVEBOX
graf_multirubber
GRAF_RUBBERBOX
GRAF_SHRINKBOX
GRAF_SLIDEBOX
GRAF_WATCHBOX
Scrap Library
SCRP_READ
SCRP_WRITE
File Selector Library
fsel_exinput
FSEL_INPUT
Window Library
WIND_CALC
WIND_CLOSE
WIND_CREATE
WIND_DELETE
wind_draw
WIND_FIND
WIND_GET
wind_new
WIND_OPEN
WIND_SET
wind_sget
WIND_UPDATE
Resource Library
RSRC_FREE
RSRC_GADDR
RSRC_LOAD
RSRC_OBFIX
rsrc_rcfix
RSRC_SADDR
Shell Library
SHEL_ENVRN
SHEL_FIND
SHEL_GET
shel_help
SHEL_PUT
SHEL_READ
shel_rdef
shel_wdef
SHEL_WRITE
Sample Programs
GRAF_SMP.GFA
DIAL_SMP.GFA
MENU_SMP.GFA
WIND_SMP.GFA
FORM_ERROR() Comparision Table
Chapter 12 - Appendix
Compatibility with GFA-BASIC 2
GEMDOS() Table
BIOS() Table
XBIOS() Table
Line-A Variable Table
V_OPNWK() and V_OPNVWK() Input Parameter Table
VDI WORK_OUT() Array Table
VT-52 Escape Code Table
Scan Code Table
ASCII Table
Special ASCII Characters
Fill Pattern Table
Line Style Table
Error Codes
Editor Error Messages
Interpreter Error Codes
BIOS Error Codes
GEMDOS Error Codes
Bomb Error Codes
GFA-Basic Compiler/Linker Manual
Author/Publisher
Introduction
The Function of the Compiler
Commands Not Accepted by the Compiler
Interpreter - Compiler Differences
Using the Menu Shell Program
The File Menu
The Options Menu
The Sets Menu
The Shell-Listing
Using with DOS Shells
Program Return Value
The Compiler
Integer Overflow
The Compiler Options
Integer Division
Integer Multiplication
Reserving Memory Space
Return Value of a Function
RC_INTERSECT() Parameters
Externally Linked Routines
Checking the BREAK keys, EVERY and AFTER
Interrupt Routines
SELECT-CASE Parameter
SELECT-CASE Optimization
Error Messages
Error Numbers Instead of Bombs
Subroutines
ENDFUNC Generation
Register Saving
FOR-NEXT Loop Checking
Integer Rounding
The Linker
Symbol Table
Library Selection
Linking Object Files
Do not Link TEST.O
Run in TT Ram
Including C Functions
Linking C Functions without C Libraries
Linking with C Libraries
Some Peculiarities
Linker Error Messages
Programming Accessories
Programming Example
Longer Programming Examples
Program Optimization
Simple Additions
Multiplication
Division
More Complicated Calculations
Loop Commands
Character Strings
Local and Global Variables
Technical Support
Additional Information
Index