R.T.Russell Home Page

R. T. RUSSELL

BBC BASIC (Z80) Manual



Table of Contents

  1. Introduction
    1. Before You Start
      1. System Requirements
      2. Technicalities
      3. Configuration
    2. Running BBC BASIC (Z80)

  2. General Information
    1. Introduction
      1. Line Numbers
      2. Statement Separators
    2. The Line Editor
    3. Expression Priority
      1. Order of Evaluation
      2. Examples
    4. Variables
      1. Specification
      2. Numeric Variables
        1. Real Variables
        2. Integer Variables
        3. Static Variables
        4. Boolean Variables
        5. Numeric Accuracy
      3. String Variables and Garbage
        1. Strings
        2. Garbage Generation
        3. Memory Allocation
      4. Arrays
    5. Program Flow Control
      1. Introduction
      2. Loop Operation Errors
      3. Program Structure Limitations
      4. Leaving Program Loops
        1. REPEAT...UNTIL Loops
        2. Changing the Loop Variable
        3. Popping the Inner Variable
      5. Local Variables
      6. Stack Pointer
    6. Indirection
      1. Introduction
      2. Query
        1. Byte Access
        2. Query as a Byte Variable
      3. Exclamation
      4. Dollar
      5. Use as Binary Operators
      6. Power of Indirection Operators
    7. Operators and Special Symbols
    8. Keywords
    9. Error Handling
      1. Introduction
        1. Types of Errors
        2. Trapping Errors
        3. Reasons for Trapping Errors
      2. Error Trapping Commands
      3. Error Reporting
        1. ERR
        2. ERL
        3. REPORT
      4. Error Trapping Examples
    10. Procedures and Functions
      1. Introduction
      2. Names
      3. Functions and Procedure Definitions
        1. Starting a Definition
        2. The Function/Procedure Body
        3. Ending a Definition
        4. Single Line Functions/Procedures
        5. Extending the Language
      4. Passing Parameters
        1. Formal and Actual Parameters
      5. Local Variables
        1. Re-entrant Functions/Procedures

  3. Assembler
    1. Introduction
      1. Instruction mnemonics
      2. Statements
      3. Labels
      4. Comments
      5. Constants
        1. Define Byte - DEFB
        2. Define Word - DEFW
        3. Define Message - DEFM
    2. Reserving Memory
      1. The Program Counter
      2. Using DIM to Reserve Memory
      3. Moving HIMEM to Reserve Memory
      4. Length of Reserved Memory
      5. Initial Setting of the Program Counter
    3. The Assembly Process
      1. OPT
      2. Assembly at a Different Address
      3. OPT Summary
        1. Code Assembled Starting at P%
        2. Code Assembled Starting at O%
      4. How the Assembler Works
      5. Saving and Loading Machine Code Programs
        1. *SAVE
        2. *LOAD
    4. Conditional Assembly and Macros
      1. Introduction
      2. Conditional Assembly
      3. Macros

  4. Statements and Functions
    1. Introduction
    2. Syntax
    3. Symbols

    1. ABS
    2. ACS
    3. ADVAL
    4. AND
    5. ASC
    6. ASN
    7. ATN
    8. AUTO
    9. BGET#
    10. BPUT#
    11. CALL
      1. Parameter Table
      2. Parameter Formats
    12. CHAIN
    13. CHR$
    14. CLEAR
    15. CLOSE#
    16. CLG
    17. CLS
    18. COLOUR
    19. COS
    20. COUNT
    21. DATA
    22. DEF
    23. DEG
    24. DELETE
    25. DIM
      1. Dimensioning Arrays
      2. Reserving an Area of Memory
    26. DIV
    27. DRAW
    28. EDIT
    29. ELSE
    30. END
    31. ENDPROC
    32. ENVELOPE
    33. EOF#
    34. EOR
    35. ERL
    36. ERR
    37. EVAL
    38. EXP
    39. EXT#
    40. FALSE
    41. FN
    42. FOR
    43. GCOL
    44. GET/GET$
    45. GOSUB
    46. GOTO
    47. HIMEM
    48. IF
    49. INKEY/INKEY$
    50. INPUT
    51. INPUT LINE
    52. INPUT#
    53. INSTR
    54. INT
    55. LEFT$
    56. LEN
    57. LET
    58. LIST
    59. LIST IF
      1. Limitations
    60. LISTO
      1. Bit Settings
    61. LN
    62. LOAD
    63. LOCAL
    64. LOG
    65. LOMEM
    66. MID$
    67. MOD
    68. MODE
    69. MOVE
    70. NEW
    71. NEXT
    72. NOT
    73. OLD
    74. ON
      1. Limitations
    75. ON ERROR
    76. OPENIN
    77. OPENOUT
    78. OPENUP
    79. OPT
      1. Code Assembled Starting at P%
      2. Code Assembled Starting at O%
    80. OR
    81. OSCLI
    82. PAGE
    83. PI
    84. PLOT
    85. POINT
    86. POS
    87. PRINT
      1. General Information
      2. Print Format Control
        1. STR$ Format Control - SS
        2. Format Selection - NN
        3. Number of Digits - PP
        4. Zone Width - WW
        5. Changing the Print Control Variable
      3. Examples
    88. PRINT#
    89. PROC
    90. PTR#
    91. PUT
    92. RAD
    93. READ
    94. REM
    95. RENUMBER
    96. REPEAT
    97. REPORT
    98. RESTORE
    99. RETURN
    100. RIGHT$
    101. RND
    102. RUN
    103. SAVE
    104. SGN
    105. SIN
    106. SOUND
    107. SPC
    108. SQR
    109. STEP
    110. STOP
    111. STR$
    112. STRING$
    113. TAB
    114. TAN
    115. THEN
    116. TIME
    117. TO
    118. TOP
    119. TRACE
    120. TRUE
    121. UNTIL
    122. USR
    123. VAL
    124. VDU
    125. VPOS
    126. WIDTH

  5. Operating System Interface
    1. Introduction
      1. File Specifiers
      2. Symbols
    2. Accessing Star Commands
      1. Syntax
      2. Case Conversion
      3. Special Characters
    3. Resident Star Commands
      1. *BYE
      2. *CPM
      3. *DIR
      4. *DRIVE
      5. *ERA
      6. *LOAD
      7. *OPT
      8. *REN
      9. *RESET
      10. *SAVE
      11. *TYPE

  6. BBC BASIC (Z80) Disk Files
    1. Introduction
    2. The Structure of Files
      1. Basics
      2. Serial (Sequential) Files
      3. Random Access Files
      4. Indexed Files
    3. Files in BBC BASIC (Z80)
      1. Introduction
      2. How Data is Read/Written
      3. How Data is Stored
        1. Numeric Data
        2. How Strings are Stored
      4. How Files are Referred To
      5. File Buffering
    4. Disk File Commands
      1. Introduction
      2. Filenames
      3. Organisation of Examples
      4. Program File Manipulation
        1. SAVE
        2. LOAD
        3. CHAIN
        4. MERGE
        5. *ERA
        6. *REN
        7. *DIR
      5. Disk Data Files
        1. Introduction
        2. Opening Files
        3. File Opening Functions
        4. OPENOUT
        5. OPENIN
        6. OPENUP
        7. CLOSE#
        8. INPUT#
        9. PRINT#
        10. EXT#
        11. PTR#
        12. EOF#
        13. BGET#
        14. BPUT#
    5. Serial Files
      1. Introduction
      2. Character Data Files
        1. Ex 1 - Writing Serial Character Data
        2. Ex 2 - Reading Serial Character Data
        3. Ex 3 - Writing 'AT END' of Character Files
      3. Mixed Numeric/Character Data Files
        1. Ex 4 - Writing a Mixed Data File
        2. Ex 5 - Reading a Mixed Data File
        3. Ex 6 - Writing 'AT END' of Mixed Files
      4. Compatible Data Files
        1. Ex 7 - Writing a Compatible Data File
        2. Ex 8 - Reading a Compatible Data File
    6. Random (Relative) FIles
      1. Introduction
      2. Designing the File
        1. Record Structure
        2. Accessing The Records
      3. Ex 9 - Simple Random Access File
      4. Ex 10 - Simple Random Access Database
      5. Ex 11 - Random Access Inventory Program
    7. Indexed Data Files
      1. Deficiencies of Random Access Files
      2. The Address Book Program
        1. File Organisation
        2. Program Organisation
        3. The Index
      3. Ex 12 (the LAST)
    8. The Binary Chop
      1. Explanation

  1. Table of ASCII Codes

  2. Mathematical Functions

  3. Error Messages and Codes
    1. Summary
      1. Trappable - Program
      2. Trappable - Operating System
      3. Untrappable - Error Code 0
    2. Details
      1. Accuracy lost
      2. Arguments
      3. Array
      4. Bad call
      5. Bad command
      6. Bad DIM
      7. Bad HEX
      8. Bad name
      9. Bad program
      10. Bad string
      11. Can't match FOR
      12. Channel
      13. Close error
      14. DIM space
      15. Directory full
      16. Disk full
      17. Division by zero
      18. Escape
      19. Exp range
      20. Failed at nnn
      21. File exists
      22. File not found
      23. FOR variable
      24. LINE space
      25. Log range
      26. Missing ,
      27. Missing "
      28. Missing )
      29. Missing #
      30. Mistake
      31. -ve root
      32. No GOSUB
      33. No FN
      34. No FOR
      35. No PROC
      36. No REPEAT
      37. No room
      38. No such FN/PROC
      39. No such line
      40. No such variable
      41. No TO
      42. Not LOCAL
      43. ON range
      44. ON syntax
      45. Out of DATA
      46. Out of range
      47. RENUMBER space
      48. Silly
      49. String too long
      50. Subscript
      51. Syntax error
      52. Too big
      53. Too many open files
      54. Type mismatch

  4. Format of Program and Variables in Memory
    1. Memory Map
      1. The Memory Map
    2. Memory Management
      1. Limiting the Number of Variables
      2. String Management
        1. Garbage Generation
        2. Memory Allocation for String Variables
    3. Program Storage in Memory
      1. Line Length
      2. Line Number
      3. Statements
      4. Line Terminator
    4. Variable Storage in Memory
      1. Integer Variables
      2. Real Variables
      3. String Variables
      4. Fixed Strings

Left HOME

INTRODUCTION Right


Best viewed with Any Browser Valid HTML 3.2!
© Richard Russell