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