This document is a language manual for DECsystem-10 BASIC (version 17D), a conversational and easy-to-learn programming language designed for problem-solving in scientific, business, and educational environments, particularly suited for time-sharing systems.
The manual covers a comprehensive range of BASIC features, from fundamental concepts to advanced techniques and system interaction:
Introduction to BASIC: Explains basic program structure (line numbers, statements, commands), fundamental concepts like arithmetic operations, mathematical functions (e.g., SIN, LOG, SQR), number representation, variables (numeric, subscripted, string), and relational symbols. It introduces core statements such as LET, READ/DATA, PRINT, GO TO, IF-THEN, ON-GO TO, and END.
Program Flow Control: Details the use of FOR and NEXT statements for creating loops, including nested loops, and the RESTORE statement for re-reading data.
Data Structures: Explains LISTS AND TABLES (arrays/matrices) and the DIM (Dimension) statement for reserving memory for larger data sets.
Running BASIC Programs: Provides instructions on gaining access to the DECsystem-10, entering and executing programs (RUN, RUNNH), correcting errors, interrupting execution, and leaving the system (BYE, GOODBYE). It also discusses debugging and diagnostic messages.
Functions and Subroutines: Describes built-in mathematical functions (e.g., INT, RND, SGN, TIM) and how to define user-specific functions (DEF, FNEND). It also covers GOSUB and RETURN for implementing subroutines, including nested calls.
Sophisticated Techniques: Expands on the PRINT statement for flexible output formatting (e.g., print zones, TAB), introduces the INPUT statement for user interaction, STOP for program termination, REM for comments, CHAIN for linking programs, and MARGIN/PAGE/NOPAGE for controlling output layout.
Matrix Operations: A dedicated section covers MAT instructions for efficient matrix computations, including reading, initializing, basic arithmetic (+, -, *), transposing (TRN), inverting (INV), and calculating the determinant (DET). It also touches on simulating N-dimensional arrays.
String Handling: Details how to read and print alphanumeric information (strings), string concatenation, conversion between strings and ASCII numbers (CHANGE, ASC, CHR$, VAL, STR$), and various string manipulation functions (LEN, LEFT$, RIGHT$, MID$, SPACE$, INSTR).
File Management and Control: Explains commands for creating, editing, and managing files in core memory and on storage devices (disk, DECtape, paper tape) using NEW, OLD, SAVE, REPLACE, COPY, UNSAVE, DELETE, RENAME, and WEAVE. It also describes interaction with the system's monitor mode.
Data File Capability: Outlines how to work with sequential and random access data files, including assigning files to channels (FILE, FILES), erasing or resetting file pointers (SCRATCH, RESTORE), reading/writing data to/from files (READ, INPUT, WRITE, PRINT), controlling random access file pointers (SET, LOC, LOF), and managing output formatting for files (QUOTE/NOQUOTE, MARGIN/PAGE/NOPAGE for files, IF END to check for end-of-file).
Formatted Output: Provides extensive detail on USING statements (PRINT USING, WRITE USING) for precise control over numeric and string output format using various image specifications and format characters.
Appendices offer a summary of BASIC statements, diagnostic error messages with explanations, and specific commands for using paper tape readers/punches with the LT33B Teletype.
Site structure and layout ©2025 Majenko Technologies