FATS - Fast Access Tree System
Table of Contents
Programming Interfaces
QBasic (ab DOS 5)

QBasic (ab DOS 5)


 
FATS.COM (resident module)

To execute FATS commands from interpretative BASIC, your application must load the resident version of FATS before you can run your BASIC application.

The initialization of the interface is explained in detail in the context of the description of the BasicA & GWBasic interfaces in the preceding paragraph.

 
Calling FATS

To execute FATS commands you simply define a command string (CMND$) and then call the following subroutine:

FATSCALL:
REM
REM *** call FATS ***
REM
FTSQUICK%=8
DEF SEG=FSEG
CALL ABSOLUTE (CMND$, FATSERR%, RECLO%, KEYADR%, FTSQUICK%)
RECLO=RECLO% : IF RECLO<0 THEN RECLO=RECLO+65536!
KEYADR=KEYADR% : IF KEYADR < 0 THEN KEYADR=KEYADR +65536!
CMND$ = "X"
CALL ABSOLUTE (CMND$, DUMMY%, RECHI%, DUMMY%, FTSQUICK%)
RECHI = RECHI% : IF RECHI<0 THEN RECHI = RECHI + 65536!
RECNO = RECLO + RECHI * 65536!
DEF SEG
RETURN

The following routine returns the FATS key value from the last search command:

FATSGETKEY:
REM
REM *** get basic string from fatskey ***
REM
FATSKEY$=""
FOR X=KEYADR TO KEYADR+24
DEF SEG=FSEG
FATSI=PEEK(KEYADR)
DEF SEG
FATSKEY$=FATSKEY$+CHR$(FATSI)
KEYADR=KEYADR + 1
NEXT X
RETURN

 
Testprograms

The FATS distribution disk for PC-DOS/MS-DOS contains some test programs in the directory DOS_16I\BASIC\QUICK that illustrate how you can use the FATS commands in your programs:

 tst0_eng.basTest program for QBasic


 

© 2008  GCS Software, Udo Gertz