Color BASIC - Commands

Commands

AUDIO Connects or disconnects cassette audio from the TV sound
CLEAR variable space reserves memory for string variables, and optionally, a machine language program
CLOAD loads BASIC program from cassette. If no name is specified, the next program is loaded
CLOADM loads machine language program from cassette. If no name is specified, the next program is loaded
CLOSE closes a device (in Color BASIC this can only be #-1, the cassette)
CLS(num) clears the screen. An optional color num (0-8) can be specified
CONT continues a program after pressing BREAK or a STOP statement
CSAVE saves a BASIC program to cassette with optional name
DATA var,var,var... stores data in a BASIC program for retrieval with the READ command
DIM variable(dimension dimensions an array and reserves memory space for it
END indicates the end of a BASIC program
EXEC executes the machine language program at memory address. If none specified, the execute address of the program loaded off tape is used
FOR {num} = {number} TO {number}
... NEXT (num) creates a loop where the numeric variable (num) runs from start number to end number in increments of number (STEP). If step is omitted, 1 is assumed
GOSUB line number} calls the subroutine at the line number specified
GOTO {line number} jumps to the program's line number specified
IF {test} THEN {command(s)} performs conditional test. If the test is true THEN commands are executed, otherwise (ELSE) other commands are executed. If the no ELSE is specified, and the test is false, the next line of the program will be run
INPUT variable Waits for input from device number. If not specified, device 0 (keyboard) is assumed. An optional prompt can be printed on the screen for the input statement
LIST - lists line(s) of your program. Either start or end can be omitted, or if both are omitted, the entire program will be listed
LLIST - works like LIST, but outputs to the printer
MOTOR turns the cassette motor on or off
NEW erases contents of memory (program and variable)
ON {num} GOSUB line 1, line 2, ... line n evaluates expression num and calls the numth subroutine listed
ON (num) GOTO line 1, line 2, ... line n evaluates expression num and jumps to the numth line listed
OPEN "",device number opens a device for communication
POKE memory address, data writes data (0-255) into memory address (0-65535)
PRINT device number,expression prints data to device specified. If omitted, #0 (screen) is assumed
PRINT @{screen position} expression works like PRINT, but prints at the location specified (0-511)
READ variable reads the next variable(s) from the BASIC program embedded with DATA statements
RENUM num renumbers each line of the program at multiples of num
RESET(x,y) sets the semigraphics pixel at location x (0-63) and y (0-31) to black
RESTORE resets the READ pointer back to the first DATA statement
RETURN returns from a subroutine
RUN num runs the BASIC program, optionally, at the line number specified
SET(x,y,color) sets the semigraphics pixel at location x (0-63) y (0-31) to color (0-8)
SKIPF skips over BASIC programs on tape until the program name specified is found
SOUND tone,duration sounds a tone with frequency (1-255) and duration (1-255)
STOP causes the program to stop executing
TAB(column) tabs to the column specified (used with PRINT)
VAL(str) returns the numeric value of a string that contains a number in string form

Read more about this topic:  Color BASIC

Famous quotes containing the word commands:

    It is clear that in a monarchy, where he who commands the exceution of the laws generally thinks himself above them, there is less need of virtue than in a popular government, where the person entrusted with the execution of the laws is sensible of his being subject to their direction.
    —Charles Louis de Secondat Montesquieu (1689–1755)

    I do not speak with any fondness but the language of coolest history, when I say that Boston commands attention as the town which was appointed in the destiny of nations to lead the civilization of North America.
    Ralph Waldo Emerson (1803–1882)

    How often we read that the enemy occupied a position which commanded the old, and so the fort was evacuated! Have not the school-house and the printing-press occupied a position which commands such a fort as this?
    Henry David Thoreau (1817–1862)