×

Search this site

For your Information. When using the search box on this page you will be directed to an external search engine (freefind.com) which may contain adverts not affiliated to MisterSpectrum.com. If you do not wish to continue please click on the 'X' in the right hand corner of this pop-up.



A short list of Timex/Sinclair 2000 series keywords not found on the ZX Spectrum.




TS2068





Overview

As the Timex/Sinclair 2000 series (specifically the 2068) was intended for the US home computer market some keywords were added.



Commands

Keyword

Meaning

Comments

DELETE


i) DELETE x

ii) DELETE x,y

iii) DELETE ,y

Result i: Delete program lines from line x to end of program.

Result ii: Delete program lines from line x to line y.

Result iii) Delete program lines from start of program to line y.

DELETE is obtained by pressing CAPS-SHIFT and 0 whilst in 'K' mode.

Many machine code programs exist to give the equivelent of DELETE on the ZX Spectrum.

RESET


RESET

Result : Resets peripherals (manual is unclear about this).

RESET is obtained by entering extended mode and pressing CAPS-SHIFT and 'P'

The keyword RESET only replaces '©' whilst in 'K' mode.



Statements

Keyword

Meaning

Comments

ON ERR


i) ON ERR GO TO m

ii) ON ERR CONTINUE

iii) ON ERR RESET m

Result i: If an error occurs go to line m.

Result ii) Program execution will resume at the point the error occured.

Result iii) Error trapping is turned off.

ON ERR is obtained by entering extended mode and pressing CAP-SHIFT and 'F'.
RESET is obtained by entering extended mode and pressing CAPS-SHIFT and 'P'

The keyword ON ERR replaces the character '{' whilst in 'K' mode.
The keyword RESET only replaces '©' whilst in 'K' mode.

Error trapping on a standard ZX Spectrum must be done by foreseeing potential errors before they occur. For instance, a division by zero can be avoided by checking that the denominator in a division is not zero.

Many extended BASIC's for the Spectrum contain error trapping, for example BETA BASIC.

SOUND


SOUND m,n [;...]

Where m is the register and n is the value to be placed in that register.

Result : Sends instructions to the sound chip's registers.

The ZX Spectrum+ 128K's PLAY statement has access to the same sound chip (AY-3-8912) as the T/S 2068 SOUND statement, however the PLAY statment is quite different to the SOUND statement. The AY-3-8912 can also be accessed via OUT statements on both micros but the two micros are not compatible as they both address different ports.



Functions

Keyword

Meaning

Comments

FREE


No operands are required.

Typical usage would be:

PRINT FREE

Returns: Amount of free memory available.
Obtained by entering extended mode and pressing CAPS SHIFT 'A'.

The keyword FREE replaces the character '~'.

On the ZX Spectrum free space can be found by :

PRINT (PEEK 23730+256*PEEK 23731)
-USR 7962

STICK


STICK (m,n)

Where m is the device type and n is the joystick number (see table below).

Typical usage would be:

IF STICK (1,2)=1 THEN LET x=x+1

Returns: An integer depending on the direction the joystick has moved or if a button has been pushed.

The device number m can be:

When m=1 the device is the joystck
When m=2 the device is the push button

The direction n can b:

if n=0 then joystick is centred
if n=1 then direction is up
if n=5 then direction is up and left
if n=4 then direction is left
if n=6 then direction is left and down
if n=2 then direction is down
if n=10 then direction is down and right
if n=8 then direction is down
if n=9 then direction is up and right

Obtained by entering extended mode and pressing CAPS SHIFT 'S'.

The keyword STICK replaces the character '|'.

On the ZX Spectrum joysick positions are usually found with IN m, where m is the I/O address of the joystick.



Nomenclature

This list uses the same letters to represent variables, expressions and sequences etc. as the ZX Spectrum BASIC manual.

α,β represents a single letter
v represents a variable
x,y,z represents numerical expressions
m,n represents numerical expressions rounded to the nearest integer
b represents a 16 bit binary number
e represents an expression
f represents a string valued expression
s represents a sequence of statement separated by colons :
c represents a sequence of colour items, each terminated by commas , or semi-colons ; A color item has the form of a PAPER, INK, FLASH, BRIGHT, INVERSE or OVER statement.

Items in italics are parameters in explanatory word form.

A short note on brackets. Where curved brackets '(' or ')' are shown they are mandatory, this includes the ZX Spectrum 'two parameter' functions and user defined functions.
Where square brackets '[' or ']' are shown the statement, parameter or value inside the bracket is optional.


References

Sinclair ZX Spectrum BASIC Programming, Steven Vickers (author), Robin Bradbeer (editor)
Timex Sinclair 2068 Personal Color ComputerUser Manual, Charles F. Durang (author)


External Links

T/S 2068 Manual at Kio's Sinclair ZX Computers Archive
T/S 2068 at www.timexsinclair.com
ZX Spectrum manual for download at retro 8-bit computers

Last revision : 01/10/2023