Contents
BASIC-SO Reference Manual
A108/0979/7500 FL
Preface
Page
Contents
Illustrations
Chapter Introduction to BASIC-80
Invoking BASIC-80
Basic filename MEMTOPaddress
Examples
Introduction to BASIC-80
Filename
Changing File Attributes
Listing the Directory of a Disk
Renaming a File
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
Decimal Integer Constants
Constants
Integer Constants
Hexadecimal Integer Constants
Double-Precision Floating-Point Constants
Octal Integer Constants
Single-Precision Floating-Point Constants
This is a string constant
String Constants
String Variables
$ = Enter next data string
L4! = Csng l4
YI,1
String Arrays
Arithmetic Operators
BASIC-SO Operators in Order of Precedence Contd
Numeric Expressions
Logical Operators
String Operator
String Expressions
Entering and Editing Programs
30 A=8*52 30 A=8*37
30 A=8*52
30 A=8
30 A--=8xx*522537 Control-R a = 8*37
Integer D
Subcommand
Command 3D press 3, then D results
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
Move the cursor to PRINT. Enter 2C RE L
Print Undefined SET The E subcommand is entered
Integer C character character
Print Undefined SET. Enter a L
Overflow, Underflow, and Divide-by-Zero
BASIC-80 Error Messages
Syntax Error Messages
Error Trapping
Trace Facility
Restarting Program Execution
Error Simulation
Error Handling
If line 40 is replaced with
Opening a Sequential File
Open 1,#1,F1DATES
Reading from a Sequential File
Refer to for further details of Print Using
Writing to a Sequential File
If executed four times, it would read all eight values
Closing a Sequential File
Value of R$ would be
Field #3, 20 AS N$
Buffers
Defining a Random 1/0 Field-FIELD
Disk File Input/Output
Field #3, 20 AS N$, 9 AS SS$
Any of the parameters can be variables
Opening and Closing a Random Disk File
Reading from a Random 1/0 File
To read the next record
Single-precision value
Writing to a Random 1/0 File
Integer
Double-precision value
MKI$
Auto first lineJ, increment
Attrib Fdrive numberfilename, W1
Attrib Fdrive numberfilename, WO
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
Edit
Error
DIR
END
Field
Error expression
Exit
FOR-NEXT-STEP
For variable=expression to expression Step expression
GET
Gosub
GET I file number ,record number
Goto
IF-THEN-ELSE
Input
Line Input
Kill
LET
List
LSET, Rset
Load
Merge
NEW
Next
9 16
Open
On ... Gosub
On ... Goto
Poke
Option Base
OUT
String Fields
Print Using
Print
Numeric fields
If X$=SEVEN and Y$=EIGHT, the results of line 40 would be
Prun
PUT
Randomize
Read
REM
Resume
Return
Line number RUN filename
Save
RUN line numberlstring expression ,F
60 END
TRON, Troff
? 5,8,2
Wait
Width
ABS
ATN
Functions
CHR$
Cint
10 A# = 1.00/3.00
Csng
CVI CVS
AO/o =
Dskf
EOF
FIX
Ok·
Inputs
Hexs
INP
LEFT$
INT
Instr
LOF
LEN
LOC
LOG
OCT$
MID$
MKI$ MKS$ MKD$
POS integer
Rights
Peek expression
RIGHT$ string,integer
Spaces
SGN
SIN
10 a =1
If A$ = 2 then Print Correct Else Goto
SPC
SPC integer
SQRexpression
TAN expression
STR$ expression
TAB 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 tab across the line
To halt program execution and return to command
Level
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
BASIC-80 Object Files
Generating Boot-Loaded and PROM-Based Versions
BASIC-80 Source Files
BASIC-80 Executable Files
Generating a Boot-Loaded RMX/80 BASIC-80
Setting baud rates, refer to the RMX/SO Users Guide
That are not boot loaded
This option is used to allocate memory. It is 1 if the boot
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
Configuration Requirements
Configuring DFS on an iSBC 80/10
Adding BASIC-SO to an Existing RMX/SO Configuration
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