BASIC language statements

ATTRB x,y

Defines the height and width of the characters. The possible values are 0 and 1.

CLEAR I,J,K

Erases all variables and reserves space for string storage, highest address for BASIC and graphical characters.

CLEAR 500
CLEAR 200,25000

CLS

Clears display

CONSOLE top,bottom

Reserves the lines between top and bottom for text.

CONSOLE 5,15
CONSOLE 0,24

DATA

Stores data in program for use by READ statement

DEFINT/DEFSNG/DEFSTR A

Declares the type of a variable as either integer, real or string.

DEFINT A-B,O-Q defines A,B,O,P and Q as integer

DIM

Dimensions one or more arrays. DIM X(40),A$(7,6),B(10,2)

END

Terminates program execution

ERL, ERR

When an error has occurred, the function ERR gives the code number and ERL gives the line number in which the error occurred.

ERROR n

Makes it possible to simulate error number n.

EXEC address

Transfers control to machine language programs at address.

FOR TO STEP NEXT

Creates a program loop which is executed, for specified range of values, STEP indicates the increment. If STEP omitted, one is used.

GOSUB

Calls subroutine beginning at specified line number.

GOTO

Causes immediate program branch to specified line number.

IF condition THEN action 1 ELSE action 2

Tests condition. If true performs action 1 and jumps to next line, if false performs action 2.

INPUT

Causes program to halt for entry from keyboard.

INPUT"ENTER NAME";N$
INPUT A,B,C,D

LET

Assigns value to variable. LET is not implemented. Use implied assignment

A=42
Hw$="HELLO WORLD"

LINE INPUT

Allows input of line from keyboard, including commas. Line is terminated by [ENTER].

LOCATE i,j,k

Place the cursor at location i,j

ON...GOSUB

Multiway branch to specified lines

ON I GOSUB 100,200,300

ON...GOTO

Multiway branch to specified lines

ON K GOTO 245,187,310

ON ERROR GOTO

Directs control to the specified line if a subsequent error is detected.

ON ERROR GOTO 5000

POKE location,value

Places value in specified memory location. Value must be 0 - 255.

PRINT or ?

Prints content of following list on screen. Comma (,) causes tab to next 12 column print zone. Semicolon (;) holds print head position.

PRINT"THE ANSWER"
PRINT A,B
PRINT "YOU'VE HAD";T;"TRIES"

PRINT TAB

Moves cursor to specified column position.

PRINT USING

Prints output in specified format.

# number field
$ dollar sign in front of number.
* fills leading spaces with asterisks.
^ prints in exponential format.
+ causes sign to be printed.

READ

Assigns the next item in a DATA statement to specified variable.

REM or '

Allows comments to be inserted in a program. Everything in a line following REM is ignored.

RESTORE

Resets the data pointer back to the first item in the first DATA statement or the statement at the specified line number.

RESTORE
RESTORE 200

RESUME

Return to the main program after execution of error subroutine.

RETURN

Returns the program from subroutine to the statement following GOSUB.

STOP

Halts execution of program at line containing STOP. Use CONT to continue execution.