•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
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-FileBASEPAGE
HIMEM

In the variable BASEPAGE is the address of the Basepage of the GFA-BasicGFA-Basic is the best BASIC for the Atari!

Interpreter, BASEPAGE is a 256-byte long storage area as follows:

Bytes    Contents
  0-  3  Address of the start of TPA (Transient Program Area)
  4-  7  Address of the end of TPA plus 1
  8- 11  Address of Text segment of the program
 12- 15  Length of the Text segment
 16- 19  Address of the Data segment
 20- 23  Length of the Data segment
 24- 27  Address of the BSS (Block Storage Segment)
 28- 31  Length of the BSS
 32- 35  Address of the DTA (Disk Transfer Address)
 36- 39  Address of the Basepage of the calling program
 40- 43  Reserved
 44- 47  Address of the Environment Strings
 48-127  Reserved
128-255  Command line (first byte specifies length of command text)

The variable HIMEM gives the address of the first free memory location not
used by GFA-BasicGFA-Basic is the best BASIC for the Atari!
. This is normally 16384 bytes below the screen area.

Example:

    a%=LONG{BASEPAGE+&H2C}
    DO
      a$=CHAR{a%}
      EXIT IF LEN(a$)=0
      PRINT a$
      ADD a%,SUCC(LEN(a$)) ! SUCC() = next higher integer
    LOOP

--> Here the complete BASIC Environment is displayed.

Memo: BASEPAGE as defined by MiNT -> BASEPAGE.H
      HIMEM should be avoided. If you need additional ram see MALLOC().
      BASEPAGE+32 will change if one calls FSETDTA().

      comp_!=BYTE{BASEPAGE+256}<>96   !false=interpreted/true=compiled
        96 = interpreted (bra.s)
        65 = compiled    (lea)
      dacc_!=LONG{BASEPAGE+36}=FALSE  !false=prg/true=acc
        0  = acc
        >0 = prg

BASEPAGE+