BASIC-SO Reference Manual
A108/0979/7500 FL
Preface
Page
Contents
Illustrations
Chapter Introduction to BASIC-80
Invoking BASIC-80
Examples
Introduction to BASIC-80
Basic filename MEMTOPaddress
Filename
Listing the Directory of a Disk
Renaming a File
Changing File Attributes
Deleting a File
You can now run, list, or edit the program
Save LP ,A
Commands
Statements
BASIC-80 Commands Contd
BASIC-80 Statements
BASIC-80 Statements Contd
BASIC-80 Functions
BASIC-80 Functions Contd
Representing Data
Functions
Constants
Integer Constants
Decimal Integer Constants
Hexadecimal Integer Constants
Single-Precision Floating-Point Constants
Octal Integer Constants
Double-Precision Floating-Point Constants
String Constants
String Variables
This is a string constant
$ = Enter next data string
L4! = Csng l4
YI,1
String Arrays
Arithmetic Operators
BASIC-SO Operators in Order of Precedence Contd
Logical Operators
String Operator
Numeric Expressions
String Expressions
Entering and Editing Programs
30 A=8*52
30 A=8
30 A=8*52 30 A=8*37
30 A--=8xx*522537 Control-R a = 8*37
Subcommand
Command 3D press 3, then D results
Integer D
If AB then
If AB then 120 Else Null SET
Syntax of the X subcommand is
At this point, the other editing subcommands may be used
Print Undefined SET The E subcommand is entered
Integer C character character
Move the cursor to PRINT. Enter 2C RE L
Print Undefined SET. Enter a L
Syntax Error Messages
BASIC-80 Error Messages
Overflow, Underflow, and Divide-by-Zero
Error Trapping
Trace Facility
Error Simulation
Error Handling
Restarting Program Execution
If line 40 is replaced with
Opening a Sequential File
Open 1,#1,F1DATES
Refer to for further details of Print Using
Writing to a Sequential File
Reading from a Sequential File
If executed four times, it would read all eight values
Closing a Sequential File
Value of R$ would be
Defining a Random 1/0 Field-FIELD
Buffers
Field #3, 20 AS N$
Disk File Input/Output
Field #3, 20 AS N$, 9 AS SS$
Opening and Closing a Random Disk File
Reading from a Random 1/0 File
Any of the parameters can be variables
To read the next record
Writing to a Random 1/0 File
Integer
Single-precision value
Double-precision value
MKI$
Attrib Fdrive numberfilename, W1
Attrib Fdrive numberfilename, WO
Auto first lineJ, increment
Clear expression,address
Commands and Statements
Close
DEF FNX
Rules for function name are the same as for variable name
Defsng Defdbl Defstr Defint
DIM
Delete
Error
DIR
Edit
END
Error expression
Exit
Field
FOR-NEXT-STEP
GET
Gosub
For variable=expression to expression Step expression
GET I file number ,record number
Input
IF-THEN-ELSE
Goto
Kill
LET
Line Input
List
LSET, Rset
Load
Merge
NEW
Next
9 16
On ... Goto
On ... Gosub
Open
OUT
Option Base
Poke
Print
Print Using
String Fields
Numeric fields
If X$=SEVEN and Y$=EIGHT, the results of line 40 would be
Prun
PUT
Randomize
Read
REM
Resume
Return
Save
RUN line numberlstring expression ,F
Line number RUN filename
60 END
TRON, Troff
? 5,8,2
Wait
Width
ABS
ATN
Cint
CHR$
Functions
Csng
CVI CVS
10 A# = 1.00/3.00
AO/o =
Dskf
EOF
FIX
Ok·
INP
Hexs
Inputs
Instr
INT
LEFT$
LEN
LOC
LOF
LOG
MKI$ MKS$ MKD$
MID$
OCT$
Rights
Peek expression
POS integer
RIGHT$ string,integer
SGN
SIN
Spaces
10 a =1
SPC
SPC integer
If A$ = 2 then Print Correct Else Goto
SQRexpression
TAB expression
STR$ expression
TAN expression
Here is an example of how the USRn statement is used
60 AO/o =
Appendix a BASIC-SO Error Codes
Table A-I. BASIC-80 Error Codes
Table A-I. BASIC-SO Error Codes Contd
Appendix B BASIC-SO Reserved Words
Page
To halt program execution and return to command
Level
To tab across the line
To resume program execution after it is stopped by
Page
Table D-l. Ascii Code List
Appendix D Ascii Codes
Table D-2. Ascii Code Definition
BEL
Appendixe
Calling Subroutines
Figure B-1. Internal Representation of Numbers and Strings
Some Real Examples
RESULT=USR%1VARPTRA, VARPTRB, VARPTRC» PRINTA+B+C= Result
Figure E-2 /8085 Assembly Language Program
Figure E-3. PL/M-80 Program
Appendix F RMX/SO BASIC-SO
Initializing the Predefined RMX/SO BASIC-SO Configuration
ISIS-II BASIC-SO
Table F-l. Sample Configuration Jumper Wiring
OOOOH-OFFFH
Generating Boot-Loaded and PROM-Based Versions
BASIC-80 Source Files
BASIC-80 Object Files
BASIC-80 Executable Files
Generating a Boot-Loaded RMX/80 BASIC-80
That are not boot loaded
This option is used to allocate memory. It is 1 if the boot
Setting baud rates, refer to the RMX/SO Users Guide
This option enables your user-written I/O drivers if you
ISBC 80/20-4
Generating a PROM-Based RMX/80 BASIC-80
Prom
F1 RMX820.L1BSTART, & FOBASCM.OBJ,& FORMXBAS.LlB
F1 DFSDIR. L1BDIRECTORY ,RENAM E,& F1 MTI810.L1B
Configuring DFS on an iSBC 80/10
Adding BASIC-SO to an Existing RMX/SO Configuration
Configuration Requirements
ISBC SO/10 System Clock
Public Variables
Adding User-Written I/O Drivers to RMX/SO BASIC-SO
Open 0,#1, L1LlST
Figure F-S. Sample User-Written 1/0 Driver Routine
Altering BASIC-80 Workspace
Burning a BASIC-80 Program Into Prom
Baprom F1HEATER.BAS
Page
Index
Ase
BASIC-80
RIGHT$,7-1O
Request for Readerscomments
111111