BASIC PROGRAMMING
SECTION 4.9
4.9.5 HELP STATEMENT
The HELP facility provides a means of breaking into normal
programs to display text for operator assistance.
After the HELP text has been read control is returned to the
main program, as if nothing had happened, by pressing the 'HELP'
key again.
4.9.5.1 The Help Vector
The text displayed by HELP can be linked to the operation
currently being performed. The start position of the text can be
set under program control. This is achieved by the pair of ram
locations 'VECTOR', indicating the memory address of the start
of text. This is controlled by the HELP function in Basic.
VECTOR can also be set by POKE.
4.9.5.2 Text Storage
Help text is stored by means of REM statements, which allow
storing of ASCII text within programs.
The address in the Help vector points to the start of the line
number. The Help program will skip forward over the first four
bytes, checking the REM token and then displaying the text.
NOTE: The REM token is stored as 143 Decimal, (BFHex).
Fig
4.2 TEXT STORAGE, shows how the following line of Basic
source code is stored:
10 REM ABCDEFGHI
Fig 4.2 TEXT STORAGE
I OE I OA 00 I BF 141 42 43 44 45 . 46 47 48 491 OD I
ASCII TEXT
LINE LINE
LENGTH NUMBER
VER.V09F
TOKEN
CR LINE
TERMINATOR
PAGE 4 - 31