×   Main Menu ALL The 8BS News Manuals (New menu) Links Worth a Look Tools Disc and Basic Webring Site Map 8BS Guestbook Old Guest Book Me The Barnsley Rovers   
8-Bit Software

The BBC and Master Computer Public Domain Library

8456 BASIC Keyword List

Submitted by Steve Fewell

Description:

The Keywords are listed one after the other. Each keyword contains the following parts
A) The Keyword itself
B) A 1-byte token value for the keyword (this value is always a negative value (>=&80) this
allows BASIC to easily determine when a Keyword stops and the token begins
(as to save space, the keywords are not stored as BASIC strings (which terminate with a
binary 0)).
C) A 1-byte flag value (this flag describes certain attibutes of the keyword and is used
by BASIC to syntax check the program and determine whether the keyword has been used
correctly or not.

The Keywords are listed in the order that BASIC evaluates keyword abbreviations.
I.e. AND is listed before ABS, so BASIC will interpret "A." as AND (not ABS).

The 1-byte flag associated with each Keyword has the following meanings depending
on which bit is set (a keyword may have a flag with many bits set at the same time):
  Bit 0 - Conditional tokenisation (don't tokenise if followed by an alphabetic character).
    This flag indicates that the keyword can safely be used as the start of a variable name (without being
    tokenised as a keyword).
  Bit 1 - Go into "middle of Statement" mode.
  Bit 2 - Go into "Start of Statement" mode.
  Bit 3 - FN/PROC keyword - don't tokenise the name of the subroutine.
  Bit 4 - Start tokenising a line number now (after a GOTO, etc...).
  Bit 5 - Don't tokenise rest of line (REM,DATA keyword, etc...)
  Bit 6 - Pseudo variable flag - add &40 to token if fund at the start of a statement.
    I.e. this will apply to "PAGE=x" but not to "x=PAGE".
  Bit 7 - Unused.

This values will be described at a later date, when the relevant routines are described.

This list is used for tokenising and de-tokenising (in REPORT/LIST) a program.

Note that the open bracket of many functions is included as part of the token,
so that when abreviating the function name (i.e. LE.) you must not include the open bracket.

Address of first char of Keyword Keyword Token Flag (byte 7 first)
&8456 AND &80 00000000
&845B ABS &94 00000000
&8460 ACS &95 00000000
&8465 ADVAL &96 00000000
&846C ASC &97 00000000
&8471 ASN &98 00000000
&8476 ATN &99 00000000
&847B AUTO &C6 00010000
&8481 BGET &9A 00000001
&8487 BPUT &D5 00000011
&848D COLOUR &FB 00000010
&8495 CALL &D6 00000010
&849B CHAIN &D7 00000010
&84A2 CHR$ &BD 00000000
&84A8 CLEAR &D8 00000001
&84AF CLOSE &D9 00000011
&84B6 CLG &DA 00000001
&84BB CLS &DB 00000001
&84C0 COS &9B 00000000
&84C5 COUNT &9C 00000001
&84CC COLOR &FB 00000010
&84D3 DATA &DC 00100000
&84D9 DEG &9D 00000000
&84DE DEF &DD 00000000
&84E3 DELETE &C7 00010000
&84EB DIV &81 00000000
&84F0 DIM &DE 00000010
&84F5 DRAW &DF 00000010
&84FB ENDPROC &E1 00000001
&8504 END &E0 00000001
&8509 ENVELOPE &E2 00000010
&8513 ELSE &8B 00010100
&8519 EVAL &A0 00000000
&851F ERL &9E 00000001
&8524 ERROR &85 00000100
&852B EOF &C5 00000001
&8530 EOR &82 00000000
&8535 ERR &9F 00000001
&853A EXP &A1 00000000
&853F EXT &A2 00000001
&8544 EDIT &CE 00010000
&854A FOR &E3 00000010
&854F FALSE &A3 00000001
&8556 FN &A4 00001000
&855A GOTO &E5 00010010
&8560 GET$ &BE 00000000
&8566 GET &A5 00000000
&856B GOSUB &E4 00010010
&8572 GCOL &E6 00000010
&8578 HIMEM &93 01000011
&857F INPUT &E8 00000010
&8586 IF &E7 00000010
&858A INKEY$ &BF 00000000
&8592 INKEY &A6 00000000
&8599 INT &A8 00000000
&859E INSTR( &A7 00000000
&85A6 LIST &C9 00010000
&85AC LINE &86 00000000
&85B2 LOAD &C8 00000010
&85B8 LOMEM &92 01000011
&85BF LOCAL &EA 00000010
&85C6 LEFT$( &C0 00000000
&85CE LEN &A9 00000000
&85D3 LET &E9 00000100
&85D8 LOG &AB 00000000
&85DD LN &AA 00000000
&85E1 MID$( &C1 00000000
&85E8 MODE &EB 00000010
&85EE MOD &83 00000000
&85F3 MOVE &EC 00000010
&85F9 NEXT &ED 00000010
&85FF NEW &CA 00000001
&8604 NOT &AC 00000000
&8609 OLD &CB 00000001
&860E ON &EE 00000010
&8612 OFF &87 00000000
&8617 OR &84 00000000
&861B OPENIN &8E 00000000
&8623 OPENOUT &AE 00000000
&862C OPENUP &AD 00000000
&8634 OSCLI &FF 00000010
&863B PRINT &F1 00000010
&8642 PAGE &90 01000011
&8648 PTR &8F 01000011
&864D PI &AF 00000001
&8651 PLOT &F0 00000010
&8657 POINT( &B0 00000000
&865F PROC &F2 00001010
&8665 POS &B1 00000001
&866A RETURN &F8 00000001
&8672 REPEAT &F5 00000000
&867A REPORT &F6 00000001
&8682 READ &F3 00000010
&8688 REM &F4 00100000
&868D RUN &F9 00000001
&8692 RAD &B2 00000000
&8697 RESTORE &F7 00010010
&86A0 RIGHT$( &C2 00000000
&86A9 RND &B3 00000001
&86AE RENUMBER &CC 00010000
&86B8 STEP &88 00000000
&86BE SAVE &CD 00000010
&86C4 SGN &B4 00000000
&86C9 SIN &B5 00000000
&86CE SQR &B6 00000000
&86D3 SPC &89 00000000
&86D8 STR$ &C3 00000000
&86DE STRING$( &C4 00000000
&86E8 SOUND &D4 00000010
&86EF STOP &FA 00000001
&86F5 TAN &B7 00000000
&86FA THEN &8C 00010100
&8700 TO &B8 00000000
&8704 TAB( &8A 00000000
&870A TRACE &FC 00010010
&8711 TIME &91 01000011
&8717 TRUE &B9 00000001
&871D UNTIL &FD 00000010
&8724 USR &BA 00000000
&8729 VDU &EF 00000010
&872E VAL &BB 00000000
&8733 VPOS &BC 00000001
&8739 WIDTH &FE 00000010

End of Tokeniser list, the following list is a continuation of the above for
LISTing/REPORT commands (It lists the Pseudo Variables with the +&40 added.
&8740 PAGE &D0 00000000
&8746 PTR &CF 00000000
&874B TIME &D1 00000000
&8751 LOMEM &D2 00000000
&8758 HIMEM &D3 00000000

The following token is only used by the REPORT command.
&875F Missing [+ ASCII 32 (Space)] &8D 00000000



 Back to 8BS
Or