I've read that the BASIC of the Timex Sinclair 2068 is a superset of the BASIC of the Sinclair ZX Spectrum with a few extra keywords.
The extra keywords are: DELETE
delete BASIC program lines,
FREE
reports free RAM, ON ERR
for error handling, RESET
which is used in combination with ON ERR
, SOUND
for using the AY-3-8192 chip, and
STICK
for getting the joysticks' states.
In RAM and in a saved BASIC program, the Spectrum like many BASICs uses a tokenized format where each BASIC keyword has a 1-byte token. Here's one website documenting the tokens. There are probably several others around.
Now I know that the TS 2068 has extra keywords, but I can't find any information on how they are encoded as tokens.
Now Sinclair BASIC is odd in that all keywords are also "characters" in the character set, but note that the tokens do not match the "ASCII" codes. As far as I can see, only two of the 2068's extra keywords are given character codes: STICK
is character 0x7c
where the Speccy has |
, and FREE
is at 0x7e
where the Speccy has ~
. This all probably has no bearing at all on the tokenization, so don't be confused.
STICK
is character0x7c
where the Speccy has|
, and FREE is at0x7e
where the Speccy has~
": Where do you see the difference?0x7c
is the hex representation of|
's ASCII value, and0x7e
is the same to~
.|
and~
characters do not exist. As you know, the original Speccy like its predecessors had all its keywords as part of its character set. SoSTICK
is character0x7c
instead of|
being there andFREE
is a character in the character set where~
would be at0x7e
. The first thing I did was a little BASIC program to print out all the characters from 32 to 255 to see if the new tokens were there.