BASIC-80 Commands and Statements¶
All BASIC-80 commands and statements are described in this reference.
Alphabetical Listing¶
A¶
- AUTO - Automatic line numbering
C¶
- CALL - Call assembly language subroutine
- CHAIN - Chain to another program
- CLEAR - Clear program variables and set memory limits
- CLOAD - Load program from cassette (not in VT180)
- CLOSE - Close file(s)
- COMMON - Define variables to pass to chained program
- CONT - Continue program execution
- CSAVE - Save program to cassette (not in VT180)
D¶
- DATA - Store data values in program
- DEF FN - Define user function
- DEF USR - Define assembly language subroutine address (not implemented)
- DEFINT/SNG/DBL/STR - Set default variable types
- DELETE - Delete program lines
- DIM - Dimension arrays
E¶
- EDIT - Edit program line
- END - End program execution
- ERASE - Erase arrays from memory
- ERR and ERL - Error number and line variables
- ERROR - Simulate error condition
F¶
- FIELD - Allocate space for random file I/O
- FOR...NEXT - Loop structure
G¶
- GET - Read record from random file
- GOSUB...RETURN - Call subroutine
- GOTO - Branch to line number
I¶
- IF...THEN...ELSE - Conditional statement
- INPUT - Input from keyboard
- INPUT# - Input from file
- LINE INPUT - Input entire line from keyboard
- LINE INPUT# - Input entire line from file
K¶
- KILL - Delete file from disk
L¶
- LET - Assign value to variable
- LIST - List program lines
- LLIST - List program to printer
- LOAD - Load program from disk
- LPRINT - Print to line printer
M¶
N¶
O¶
- ON ERROR GOTO - Error trapping
- ON...GOSUB/GOTO - Computed branch
- OPEN - Open file for I/O
- OPTION BASE - Set array lower bound
- OUT - Send byte to I/O port
P¶
- POKE - Write byte to memory location
- PRINT - Print to screen
- PRINT# - Print to file
- PUT - Write record to random file
R¶
- RANDOMIZE - Seed random number generator
- READ - Read DATA values
- REM - Remark/comment
- RENUM - Renumber program lines
- RESUME - Resume after error
S¶
T¶
- TRON/TROFF - Trace on/off
W¶
- WAIT - Wait for I/O port condition
- WHILE...WEND - While loop structure
- WIDTH - Set output line width
- WRITE - Write data to screen
- WRITE# - Write data to file
By Category¶
Program Control¶
- CHAIN - Chain to another program
- CLEAR - Clear variables and memory
- COMMON - Pass variables to chained program
- CONT - Continue execution
- END - End program
- NEW - Delete program
- STOP - Stop execution
Flow Control¶
- FOR...NEXT - Loop structure
- GOSUB...RETURN - Subroutine call
- GOTO - Unconditional branch
- IF...THEN...ELSE - Conditional
- ON...GOSUB/GOTO - Computed branch
- WHILE...WEND - While loop
Input/Output¶
- INPUT - Keyboard input
- LINE INPUT - Line input from keyboard
- LPRINT - Print to printer
- PRINT - Print to screen
- WRITE - Write data to screen
File I/O¶
- CLOSE - Close files
- FIELD - Define random file buffer
- GET - Read random file record
- INPUT# - Input from file
- LINE INPUT# - Line input from file
- OPEN - Open file
- PRINT# - Print to file
- PUT - Write random file record
- WRITE# - Write to file
File Management¶
- CLOAD - Load from cassette
- CSAVE - Save to cassette
- KILL - Delete file
- LOAD - Load program
- MERGE - Merge program
- NAME - Rename file
- SAVE - Save program
Data Handling¶
Arrays¶
- DIM - Dimension arrays
- ERASE - Erase arrays
- OPTION BASE - Set array base
Variables and Assignment¶
- LET - Variable assignment
- SWAP - Exchange variables
- DEFINT/SNG/DBL/STR - Default types
Functions¶
Error Handling¶
- ERR and ERL - Error variables
- ERROR - Simulate error
- ON ERROR GOTO - Error trap
- RESUME - Resume after error
String Manipulation¶
- MID$ - Replace substring
Memory and Hardware¶
Program Editing¶
- AUTO - Automatic line numbering
- DELETE - Delete program lines
- EDIT - Edit program line (CLI line editor)
- LIST - List program lines
- LLIST - List program to printer
- RENUM - Renumber program lines
System¶
- NULL - Set null character count
- RANDOMIZE - Seed RNG
- REM - Comment
- TRON/TROFF - Trace mode
- WIDTH - Set line width
Modern Extensions (MBASIC only)¶
- HELPSETTING - Display help for settings
- LIMITS - Show interpreter limits
- SET - Configure interpreter settings
- SHOW SETTINGS - Display current settings
See Also¶
- Functions - BASIC-80 intrinsic functions
- Error Codes - Error messages and codes
- Examples - Example programs