GFA-BASIC for MS-DOS

Home- Win32

GFA-Basic 4.51 MS-DOS 

The programming environment consists of the main GFA Basic editor, interpreter, compiler and some demonstration programs.

GFA-Basic is/was available for the Amiga, Atari ST, MS-DOS and Windows 3.x. Compatability over all these environments is one of the prime attributes of  GFA-Basic. A kernel of about 500 commands is fully syntax compatible over all the above environments. GFA-Basic MS-DOS now gives the MS-DOS programmer the ability to create his own window and menu user interface with very little overhead.

Note how easy it now is with GFA-BASIC to create multiple window based applications, complete with slider bars, close boxes, and drag bar. Pop up menus are also very easily supported. All these functions are
available from within GFA-BASIC MS-DOS.

Some demonstration programs may be written specifically for a screen mode which your computer may not support. Most demonstrations are written for an EGA or VGA screen. The editor will however work in any
screen resolution. A good program would of course test for which screen modes are supported using the _ADAP command and adjust resolutions and co ordinates dynamically.

Matrix arithmetic is also supported with a range of MATRIX commands.

Extended memory, ie memory beyond the 640K MS-DOS limit, can also be accessed via the set of E commands.

Most commands can also be abbreviated for fast entry: e.g.
FOR i=x TO y STEP z NEXT i

can be simply entered as:

f i x y z n i

The interpreter would automatically expand the line and check the syntax.

Another unique feature of GFA-BASIC is the ability to fold whole PROCEDURES and FUNCTIONS into single lines. These can be folded and unfolded using ALT+Q or ALT+W

To break a running program:  CTRL+ BREAK  or SHFT+CTRL+ALT

Editor commands:   

   CTRL+Del deletes line
   CTRL+Y   deletes line
   CTRL+U   undelete
   CTRL+N   Insert blank line

CHECK NAMES     If this switch is active, you will get an alert every time a  new variable is entered. This will ensure existing variables are not mistyped  and mistaken for new variables.

FONT            This will switch between 25 and  50 lines on an EGA/VGA screen.

Now follows a few of the commands for GFA -BASIC MSDOS. Most of these commands are compatible with GFA-BASIC for WINDOWS 3.x

Commands and Functions

%=, &=, |=, ^=
/*... */,  ', //
*=, +=, -=. /=
++, --
@
ADD x,y
ALERT  i%,a$,j,b$,k
ARRAYFILL  a()=x
BGET  #n,addr,count
BLOAD a$[,addr]
BMOVE  from_assr%,to_addr%
BPUT #n,addr,count
BSAVE a$,addr,count
CALL addr%{param]
CARD{}
CHAIN a$
CHAR{}=
CHDIR  a$
CHDRIVE  n
CLEAR
CLEARW#
CLOSE
CLR
DATA
DATE$=
DEC
DEFBIT  a$
DEFBYT
DEFDBL  a$
DEFFLT
DEFINT
DEFNUM
DEFSNG
DEFSTR
DEFWRD
DELAY
DELETE
DIM
DIR...TO
DIV
DOUBLE{}
DPOKE
EAVAIL
EDIR
EDIT
EGET
EKILL
EMEMGET
EMEMPOP
EMEMPUSH
END
EPARLOAD
EPARSAVE
EPOP
EPUSH
ERASE
ERROR  n
EXEC
FIELD#...AS...AT
FILES...TO
FILESELECT
FORM INPUT
FORM INPUT AS
FREEFONT
FSETDTA
GET#
GETEVENT
GOSUB
HARDCOPY
HTAB
INC
INP(#N)
INPUT
INPUT#
INPUT$
INSERT
INT{}=
KILL
KILLEVENT
LET
LINE INPUT
LINE INPUT #
LIST
LOAD
LOADFONT
LOCAL
LOCATE
LONG{}=
LPOKE
MEMAND
MEMBFILL
MEMLFILL
MEMOR
MEMWFILL
MEMXOR
MID$
MKDIR
MODE
MONITOR
MOUSEX
MOUSEY
MUL
NAME...AS
NEW
ON BREAK
ON BREAK CONT
ON BREAK GOSUB
ON ERROR
ON ERROR GOSUB
ON MENU
ON MENU GOSUB
ON MENU KEY GOSUB
ON MENU MESSAGE
OPEN
OPENW#
OPTION BASE
OUT #N
OUT PORT
PAUSE
PEEKEVENT
POKE
POKE$
PSAVE
PUT #
QUIT
RANDOMIZE
READ
RECALL#
RECORD#
RELSEEK#
REM
RENAME...AS
RESTORE
RESUME
RMDIR
RUBBERBOX
RUN
SAVE
SCROLL OFF
SCROLL ON
SEEK#
SETTIME
SHELL
SHORT{}=
SINGLE{}
STOP
STORE#
SUB
SWAP
SYSCOL
SYSTEM
TBOX
TCLIP
TCLIP OFF
TCOLOR
TGET
TIME$=
TOPW#
TOUCH
TPBOX
TPUT
TROFF
TRON
TYPE
USHORT{}=
UWORD{}=
VOID
VTAB
WIN
WORD{}=
WRAP OFF
WRAP ON
WRITE
{}=

Conditionals

SELECT CASE
DEFAULT ...ENDSELECT
IF...ENDIF
ON...GOSUB
SWITCH CASE
OTHERWISE ENDSWITCH

Functions

&
ADD()
AND
AND()
ARRPTR()
ASC()
BCHG()
BCLR()
BOUND()
BOUNDB()
BOUNDC()
BOUNDW()
BSET()
BTST()
BYTE()
BYTE{}
CARD()
CARD{}
CFLOAT()
CHAR{}
CINT()
CRSLIN
CVD()
CVI()
CVL()
CVS()
DATE$
DFREE()
DIM?()
DIR$()
DIV()
DOUBLE{}
DPEEK()
EOF()
EQV()
ERR$()
EXEC()
EXIST
FGETDTA
FRE()
FSFIRST()
FSNEXT()
GETSIZE()
IMP()
INKEY$
INP(PORT)
INT()
INTR()
INT{}
KEYGET
KEYTEST
LOC()
LOF()
LONG{}
LPEEK()
MALLOC()
MAX()
MENU()
MFREE()
MIN()
MOD
MOD()
MSHRINK()
MUL()
NOT
OR
OR()
PEEK$()
PEEK()
POPUP()
POS()
PRED()
QSORT
RAND()
RANDOM()
RND
ROL()
ROR()
SCALE()
SHL()
SHORT()
SHORT{}
SHR()
SIN()
SINGLE{}
SINH()
SINQ()
SSORT
STRING$()
SUB()
SUCC()
SWAP()
TAN()
TANH()
TIME$
TIMER
USHORT()
USHORT{}
UWORD()
UWORD{}
V:
VAL()
VAL?()
VARPTR()
WORD()
WORD{}
XOR()
{}
|

Graphic Commands

BOX  x1,y1,x2,y2
CIRCLE x,y,r[,w1,w2]
CLIP
CLIPOFF
CLOSEW
COLOR
CURVE  x0,y0,x1,y1,x2,y2,x3,y3
DEFFILL
DEFLINE
DEFTEXT
DRAW
ELLIPSE
EMSGET
EMSPUT
FILL
FULLW
GET
GRAPHMODE
INFOW
LINE
MENU
MENU KILL
MOVEW
PBOX
PCIRCLE
PELLIPSE
PLOT
POINT
POLYFILL
POLYLINE
PRBOX
PSET
PUT
RBOX
SCREEN
SETDRAW
SIZEW
TEXT
TITLEW
WINDFIND
WINDGET
WINDSET
DRAGBOX
GETFIRST
GETNEXT
RC_INTERSECT()

Logical Operators

&&
||

Matrix Commands

MAT ADD
MAT BASE
MAT CLR
MAT CPY
MAT DET
MAT INPUT#
MAT INV
MAT MUL
MAT NEG
MAT NORM
MAT ONE
MAT PRINT
MAT QDET
MAT RANK
MAT READ
MAT SET
MAT SUB
MAT TRANS
MAT XCPY

Numeric Functions

ABS()
CEIL()
COMBIN()
EVEN()
EXP()
FACT()
FRAC()
LOG()
LOG10()
LOG2()
ODD()
ROUND()
SGN()
SQR()
TRUNC()
VARIAT()
VAR

Print Commands

PRINT
PRINT AT
PRINT USING
SPC
PRINT #N,USING
PRINT AT...USING
PRINT#
TAB()

Register Variables

_AH
_AL
_AX
_BH
_BL
_BP
_BX
_CH
_CL
_CX
_DH
_DI
_DX
_SI
_DL
_EAX
_EBP
_EBX
_ECX
_EDI
_EDX
_EFL
_ESI
_ESP
_FL

Structure Control

DO...LOOP
EXIT IF
FOR...NEXT
FUNCTION...ENDFUNC
PROCEDURE...RETURN
REPEAT...UNTIL
SELECT...CASE
WHILE...WEND

String Functions

LEFT$()
MID$()
TRIM$
BIN$()
CHR$()
DEC$()
HEX$()
INSTR()
LCASE$()
LEN()
LOWER$()
LSET
MIRROR$()
MKD$()
MKF$()
MKI$()
MKL$()
MKS$()
OCT$()
PRED()
RIGHT$()
RINSTR()
RSET
SPACE$()
STR$()
SUCC()
UCASE$()
UPPER$()
XLATE$()

Trig Functions

ARCOSH()
ARSINH()
ARTANH()
ACOS()
ASIN()
ATAN()
ATN()
COS()
COSQ()
DEG()
RAD()

User Defined Function

DEFFN

Variables

_C
_PSP
_X
_Y
BASEPAGE
BOOLEAN !
BYTE |
DOUBLE #
ERR
FALSE
FATAL
LONG %
PI
TRACE$
TRUE
WORD&


Top