Cromemco Multi-User BASIC User manual

Five Dollars
-
..

(
Part
No.
023-0061
CROMEMCO
Multi-User
BASIC
Instruction
Manual
CROMEMCO,
Inc.
280
Bernardo
Avenue
Mountain
View,
CA
94043
cッーケイセァィエ
©
1979
CROMEMCO,
INC.
ALL
RIGHTS RESERVED
November
1979

Table
of
Contents
1.
Introduction
••••••
Overview
••••••••
Getting
Started
••
Backup
•••••••••
·
..
••••
1
• • 2
.4
•
••
4
....
.........
2.
User
Protection
••••••••••••••••
Directory
Protection
•••••••••
Protection
of
File
Integrity
••
Protection
from
Deadlock
••••••
•
•••••
5
.6
• • • • • • • • • • • 6
.7
3.
Description
of
the
Operating
System.
.10
·
..
4.
Attributes
of
the
Operating
System
••••
Type
Ahead
•••••••••••••••
'
•••••••••••••
CDOS
Call
to
Display
Job
Information.
.12
•
••••
13
•
•••
14
.............·
..
·....
.
..
.15
·
....•..
••
16
•
••••••
17
.
..••....•....•
•
18
•
.19
.21
•
.22
•
.23
•
••••
24
•
.25
• • • •
.27
•
•••••
.
28
·
••••••.•
•
30
.31
Commands.
.
..
.
...
..
.
..
·....
·...
·...
·.
...
.
..
·
...
.
..
.....
Multi-User
CDOS
Intrinsic
BACKG.
BAS.
CHA.
DETACH
••
ATTACH.
KI
LL
••••
LOGOFF
••
MORE.
PRT:
•••
RESCUE
•••••••••••••••••••
SET
•••••••••••
SYS.
TIME
•••••••••••••••
5.
·.
6.
Multi-User
BASIC
Variable
Names.
Line
Names.
Variable
·
..
and
Line
Names.
.32
•
•••
33
••••
34
7.
Multi-User
BASIC
Commands
••
·
...
·
..
..35
CLEAR
•••
.....·
...
·.... ..... ·.... •
36
COMMON.
·
...
·......
..37
DELREM. .
...
••••
39
EXPAND. ......·
...
..·.·
..
•
••
41
IF
•••
THEN
DO
• • •
ELSE.
••
ENDDO.
•
.42
LVAR
•••
.
...
...... ·
...
••
,.44
NOLIST.
·. .
..
•
•••
46
OPEN
•••
·
..
.48
PROTECT. .....·
...
·.... ...·...
••
50

8.
Cromemco
In-Line
BASIC
Editor
•••••••••••••••••
51
EDIT
•••••••••••••••••••••••••••••••••••••••••
54
FIND
•••••••••••••••••••••••••••••••••••••••••
55
CHANGE
•••••••••••••••••••••••••••••••••••••••
56
9.
Multi-User
BASIC
Error
Messages
••••••
•••••
57
10.
Modification
of
Multi-User
BASIC
••••••••••••••
59
Customizing
the
Command
Line
•••••••••••••••••
60
Access
to
CDOS
Programs
&
Commands
•••••••••••
63
Restricting
Use
of
the
CHA
Command
•••••••••••
63
Restricting
Use
of
the
MORE
Command
••••••••••
64
Restricting
Use
of
the
KILL Command
••••••••••
64
Machine
Level
BASIC
Instructions
•••••••••••••
64
Disk
Drive
Configuration
•••••••••••••••••••••
65
11.
Hardware
Configuration
••••••••••••••••••••••••
66
System
RAM
Cards
•••••••••••••••••••••••••••••
67
User
RAM
Cards
•••••••••••••••••••••••••••••••
68
Disk
Controller
Card
•••••••••••••••••••••••••
69
Serial
Interface
Card
••••••••••••••••••••••••
69
Interrupt
Priority
Cable
•••••••••••••••••••••
70
Special
Configuration
••••••••••••••••••••••••
70
Index

(
Multi-User
BASIC
Instruction
Manual
Introduction
Introduction
1

/
(.
Multi-User
BASIC
Instruction
Manual
Introduction
An
Overview
C
romemco'
s
new
Mul
ti-User
BASIC
Operating
System
includes
features
which
are
usually
found
only
on
large
computers.
It
is
composed
of
a
エゥュ・セウィ。イゥョァ
operating
system,
Multi-User
COOS,
and
an
enhanced
version
of
Cromemco
16K
Extended
BASIC.
The
hardware
configuration
requi
red
for
the
operation
of
the
Multi-User
BASIC
Software
System
is
shown
in
chapter
11
of
this
manual.
The
current
version
includes
many
new
features.
Users
are
no
longer
restricted
to
running
BASIC.
One
user
can
run
the
assembler,
for
example,
while
another
is
running
the
FORTRAN
compiler,
and
a
third
is
running
BASIC.
The
new
version
allows
users
to
start
several
jobs
from
the
same
terminal
by
using
the
Multi-User
COOS
command,
DETACH.
Other
new
COOS
commands
are:
-
ATTACH
retrieves
aDETACHed
job.
-
BACKG
allows
a
job
to
be
run
in
the
background.
-
BAS
loads
and
runs
BASIC.
-
CHA
is
the
command.entered
in
order
to
change
diskettes.
-KILL
allows
jobs
to
be
terminated
from
selected
terminals.
-
LOGOFF
allows
users
to
terminate
their
sessions.
-
MORE
allows
users
to
obtain
larger
memory
allocations.
-PRT:
allows
the
use
r s
to
dot
....
matrix
or
fully
printer
with
CTRL-P.
access
either
a
formed
character
-
RESCUE
allows
users
to
initialize
disabled
terminals.
2

Multi-User
BASIC
Instruction
Manual
Introduction
-SET
-SYS
-TIME
allows
the
user
of
terminal-l
to
set
the
time,
date,
and
adj
ust
the
clock
rate.
Each
user
may
set
the
number
of
nulls
after
each
RETURN,
an
automatic
line
feed
after
each
RETURN,
and
a
user-selected
ERASE
character.
dis
pI
a y s
for
a
11
use
r s :
job
n
urn
b e r ,
status
(busy
or
wai
t),
whether
BAS
IC
is
loaded,
which
CDOS
program
is
running,
how
much
memory
is
allocated,
terminal
number
and
user
name,
and
the
time
that
user
logged
on.
displays
the
current
time
and
date.
Since
Multi-User
COOS
buffers
input
from
the
terminal
keyboards,
users
can
enter
characters
before
the
executing
program
requests
them.
This
feature,
commonly
known
as
"type-ahead",
is
often
very
convenient
to
use.
Multi-User
BASIC
includes
the
following
attributes
in
addition
to
those
of
16K
Extended
BASIC:
-
an
in
line
BASIC
text
editor
-
upper
and
lower
case
program
text
-
variable
names
up
to
31
characters
long
-
line
and
subroutine
names
up
to
31
characters
long
-
many
new
statements
and
commands
such
as
-
PROTECT
which
insures
that
a
file
cannot
be
read
from,
written
to,
or
erased
-
IF
•••
THEN
OO
•••
ELSE
•••
ENOOO
セ
COMMON
for
linking
BASIC
programs
-
LVAR
which
lists
the
variables,
functions,
and
label
names
of
the
program
together
with
their
current
values
NOLIST
and
OELREM
which
can
be
used
to
protect
proprietary
SAVEd BASIC
programs
3

Multi-User
BASIC
Instruction
Manual
Introduction
Getting
Started
Turn
on
the
terminals,
disk
drives,
and
computer.
Set
each
of
the
terminals
to
9600,
481313,
2400,
1200,
300,
150,
or
110
baud.
The
terminals
need
not
all
be
set
the
same.
Place
the
Multi-User
system
diskette
in
Disk
Drive
A.
Depress
the
RETURN
key
on
terminal-l
several
times.
prompts
will
be
issued
for
the
name
of
the
user,
the
date,
and
the
time.
After
the
time
is
set,
the
following
prompt
is
issued:
place
diskette
in
Drive
A
and
press
any
key
This
provides
the
option
of
exchanging
the
disk
in
Drive
A
before
going
on.
Prompts
are
then
issued
to
determine
whether
or
not
diskettes
are
loaded
into
the
remaining
drives
in
the
system.
All
files
left
open
on
the
diskettes
in
any
of
the
drives
will
be
closed.
This
provides
a
way
to
rectify
the
situation
when
the
computer
is
inadvertently
reset
with
files
open.
Additional
users
may
then
log
on
the
other
terminals.
Log-on
for
each
of
these
users
is
accompl
ished
by
pushing
RETURN
several
times
so
that
the
operating
system
can
detect
the
baud
rate
of
the
terminal.
A
prompt
will
then
be
issued
for
the
user's
name.
Wr i
te-protecting
di
skettes
is
not
necessary
wi
th
Multi-User
BASIC.
Write-protected
diskettes
are
those
8"
di
sks
wi
th
a
notch
exposed
and
those
5"
disks
with
the
notch
covered.
There
is
a
facility
for
write-protecting
files
instead.
See
the
PROTECT
command.
Backup
It
is
strongly
recommended
that
a
backup
disk
be
made
immediately
upon
receiving
your
FDM
software
package.
4

Multi-User
BASIC
Instruction
Manual
User
Protection
User
Protection
5

(
Multi-User
BASIC
Instruction
Manual
User
Protection
Multi-User
BASIC
provides
several
different
kinds
of
protection
for
users.
Directory
Protection
The
operating
system
maintains
directories
which
contain
information
about
the
files
stored
on
the
disks.
In
order
to
protect
this
information,
locks
are
provided
in
the
operating
system
to
insure
that
a
user
can
complete
cer.tain
kinds
of
directory
accesses,
once
begun,
before
another
user
can
begin
one.
For
example,
suppose
that
after
BASIC
has
begun
to
execute
aCLOSE
file
statement
for
a
user,
the
operating
system
interrupts
and
switches
to
a
second
user.
If
the
second
user
then
attempts
to
execute
a
RENAME
file
statement,
the
operating
system
will
cancel
the
turn
and
not
allow
further
execution
time
until
the
CLOSE
statement
has
been
completed
·for
the
first
user.
Protection
of
File
Integrity
There
are
two
different
senses
in
which
files
can
be
safeguarded.
Multi-User
BASIC
has
the
PROTECT
command
which
can
be
used
to
specify
that'a
file
cannot
be
erased,
written
to,
or
read
from.
This
helps
to
preserve
files
from
inadvertant
miSuse.
There
is
another
way
in
which
files
protected
in
mul
ti-user
systems
which
than
one
user
to
write
to
the
same
file.
need
to
be
allow
more
Suppose
that
two
users
access
a
file
storing
charge
account
information
for
a
retail
store
in
the
following
sequence.
User-l
reads
the
reco
rd
fo
r
accoun
t
no.
300
and
use
r-2
al
so
reads
the
same!
reco
rd.
User-l
adds
a
new
charge.
to
the
account
and
writes
the
record
back
to
the
file.
User-2
makes
a
correction
to
the
address
field
of
the
account
and
updates
the
file.
6

(
Multi-User
BASIC
Instruction
Manual
User
Protection
The
result
is
that
the
charge
data
that
user-l
added
to
the
record
is
lost
because
it
has
been
over-written
by
user-2.
This
is
called
the
mutual
exclusion
problem.
What
is
needed
is
a
way
to
restrict
access
to
files.
This
is
provided
by
the
OPEN
statement.
A
file
can
be
opened
by
a
user
in
several
ways:
(W)
exclusive
permission
to
write
to
the
file,
but
non..-exclusive
permission
to
read
from
it,
.
(X)
exclusive
permission
to
read
and
write,
(N) a
guarantee
that
no
user
will
wri
te
to
the
file,
and
non-exclusive
permission
to
read,
or
(R)
non-exclusive
permission
to
read
the
file.
The
solution
to
example
above
is
for
two
people
to
open
for
writing.
the
problem
illustrated
by
the
automatic
since
there
is
no
way
simultaneously
have
the
same
file
This,
however,
can
present
another
problem.
One
user
can
have
a
file
open
for
wri
ting
for
a
long
time,
locking
all
others
out.
A
way
to
minimize
this
problem
is
to
write
,the
BASIC
program
so
that
the
file
is
opened
only
for
reading
(R)
while
the
user
is
searching
through
it.
When
the
user
is
actually
ready
to
update
the
file,
the
BASIC
program
should
open
it
for
reading
and
writing
(W
or
X)
just
long
enough
to
re-read
the
record
that
is
to
be
altered
(to
insure
that
current
data
is
being
acted
upon)
and
to
write
the
corrected
record
back
to
the
file.
In
cases
where
records
refer
to
each
other
so
that
updating
one
record
requires
updating
the
other,
the
file
must
be'open
for
reading
and
writing
long
enough
to
re-reao
and
update
both
records.
Protection
from
Deadlock
When
a
data
base
includes
more
than
one
file,
records
iq
one
file
may
refer
to
records
in
another
file
in
エィセ
data
base.
7

(
Multi-User
BASIC
Instruction
Manual
User
Protection
In
this
case,
updating
a
record
in
one
file
may
require
updating
records
in
other
files
also.
Therefore,
when
a
user
is
ready
to
update
a
record,
the
BASIC
program
should
open
all
the
files
in
the
data
base
for
reading
and
writing
(W
or
X)
just
long
enough
to
re-read
the
record
and
relevant
cross-referenced
records
and
to
update
them.
This
introduces
the
potential
for
a
new
problem,
however.
Suppose
that
user-l
has
file-l
open
for
writing
and
user-2
has
file-2
open
for
writing,
but
both
users
need
both
files
open
for
writing
to
complete
the
current
operation.
This
is
a
deadlock.
Neither
user
can
proceed.
Multi-User
BASIC
has
a
feature
which
can
be
used
to
avoid
this
dilemma.
If
a
BASIC
program
concatenates
a
series
of
statements
from
the
following
list,
then
the
directory
will
be
"locked
from
the
time
the
first
statement
in
the
series
begins
execution
until
a
statement
which
is
not
in
the
list
occurs.
OPEN
CLOSE
CREATE
PROTECT
ERASE
This
means
that
after
a
user
has
opened
the
first
file
in
a
list
of
consecutive
files,
no
other
user
can
open
a
file
further
down
in
the
list
even
if
the
operating
system
interrupts
and
switches
to
another
user.
Deadlock
will
not
occur
includes
code
such
as
the
opening
of
the
data
base.
base
incl
udes
files
named
"file-3".
8
if
the
BASIC
program
following
to
handle
the
We
assume
that
the
data
"file-I",
"file-2",
and

(
Multi-User
BASIC
Instruction
Manual
User
Protection
10
Integer
False,
True,
Try'again,
Error'number
20
Fa1se=0
30
True=Not
False
1000
*Open'data'base
1010
On
Error
Goto
Data'base'in'use
1020
Open
\1\
"file-I",
OW"
1030
Open
\2\
"fi1e-2",
OW"
1040
Open
\3\
BヲゥQ・MSセL
OW"
1045
Rem
DO
NOT
INTERSPERSE
ANY
STATEMENT
1050
Rem
AMONG
THE
THREE
LINES
ABOVE.
1060
Rem
IF
WE
HAVE
REACHED
THIS
POINT,
THEN
WE
HAVE
1070
Rem
SUCCEEDED
IN OPENING
ALL
THE
FILES
1080
Rem
IN
THE
DATA
BASE.
1090
Rem
RESTORE
THE
NORMAL
ERROR
HANDLER.
1100
On
Error
Goto
Norma1'error'hand1er
.
1200
*Data'base'in'use
1205
Rem
IT
IS
IMPERATIVE
THAT
WE
TRY
TO
CLOSE
1210
Rem
ALL
FILES
IN
THE
DATA
BASE,
EVEN
THOUGH
1220
Rem
SOME
MAY
NOT
HAVE
BEEN
OPENED
1230
Rem
AT
THE
TIME
THE
ERROR
occurredセ
1235
Rem
TEMPORARILY
MAKE
DO'NOTHING,
WHICH
DOES
1240
Rem
NOTHING
AT
ALL,
THE
ERROR
HANDLER.
1250
Error'number
=
Sys(3)
1260
On
Error
Gosub
Do'nothing
1270
Close
\1\
1280
Close
\2\
1290
Close
\3\
1300
Rem
RESTORE
THE
ERROR
HANDLER
1310
On
Error
Goto
Norma1'error'hand1er
1320
Rem
UNLESS
THE
ERROR
WAS
224
1330
Rem
(FILE
BUSY),
DO
NOT
TRY
AGAIN.
1340
Try'again
=
False
1350
If
Error'number
=
224
Then
Do
1350
Input"Data
Base
busy.
Try
again?
",Rep1y$
1360
If
Rep1y$(0,0)="y"Then
Try'again=True
1365
If
Rep1y$(0,0)="Y"Then
Try'again=True
1370
Enddo
1380
If
Try'again=True
Then
Goto
Open'data'base
1500
*Do'nothing
1510
Return
9

(
Multi-User
BASIC
Instruction
Manual
Operating
System
Description
Description
of
the
Operating
System
10

Multi-User
BASIC
Instruction
Manual
operating
System
Description
Description
of
the
Operating
System
The
operating
system
has
control
of
the
computer.
When a
user
logs
on,
the
operating
system
finds
an
empty
bank
of
memory
and
then
enters
the
user
into
the
active
queue.
The
users
in
this
queue
take
turns
executing
their
programs.
Each
turn
is
on
the
order
of
tens
of
milliseconds
duration.
However,
if
a
user
requests
input
or
output
which
is
not
ready,
the
operating
system
terminates
the
user's
current
turn
and
does_
not
grant
another
turn
until
the
input
or
output
is
ready.
Terminal
input
and
output
are
serviced
by
means
of
interrupts.
When a
key
is
pushed
on
the
user's
keyboard,
the
current
process
in
execution
is
interrupted
long
enough
for
the
operating
system
to
get
the
character
and
put
it
into
the
user's
terminal
buffer.
If
blocked
awaiting
this
input,
the
user
would
take
a
place
in
the
active
queue.
When a
turn
comes
around
again,
the
user's
program
can
then
fetch
the
character
from
the
buffer.
Terminal
output
is
handled
in
a
similar
manner.
Another
function
of
the
operating
system
is
to
coordinate
requests
for
input
from
and
output
to
the
disks.
When a
user
makes
such
a
request,
it
is
placed
into
the
disk
I/O
queue,
and
the
user
is
blocked
until
the
request
has
been
serviced.
The
requests
in
the
disk
queue
are
ordered
by
disk
and
by
track.
This
minimi
zes
the
motion
of
the
disk
heads
required
to
service
the
users.
11

(
Multi-User
BASIC
Instruction
Manual
Attributes
of
Multi-User
CDOS
Attributes
of
Multi-User
CD
OS
12

(\
Multi-User
BASIC
Instruction
Manual
Attributes
of
Multi-User
CDOS
Type-ahead
Since
Multi-User
CDOS
buffers
input
from
the
terminal
keyboards,
users
can
enter
characters
before
the
executing
program
requests
them.
This
feature,
commonly
known
as
II
type-ahead
II
,
is
often
helpful.
When
using
the
Screen
Editor,
for
example,
one
can
insert
a
string
of
characters
and
then
begin
to
delete
some
characters
following
the
string
without
having
to
first
wait
for
the
screen
to
be
upda
ted.
In
case
of
error,
typing
CTRL-U
will
discard
all
the
characters
which
have
not
already
been
utilized
by
the
executing
program.
There
is
a
second
way
of
entering
characters
at
the
keyboard
before
the
executing
program
requires
them.
CDOS
and
many
programs
which
run
under
CD
OS
accept
keyboard
input
one
line
at
a
time.
The
user
types
the
characters
of
the
line
and
then
terminates
the
line
with
a
carriage
return.
In
Mul
t
i-Use
rCDOS,
the
1 i
nefeed
key
may
be
used
instead
of
the
carriage
return
key
to
separate
d i
ffe
rent
input
1
ines
sent
to
the
prog
ram.
The
linefeed
is
transformed
into
a
carriage
return
when
it
is
sent
to
the
executing
program.
However,
none
of
the
characters
are
sent
to
the
program
until
an
actual
carriage
return
is
typed.
For
example,
one
could
enter
the
following
line
followed
by
a
carriage
return.
ERA
*.BAKIBATCHISTATIASMB
TESTFILE.ABZI
Note
that
each
linefeed
is
echoed
to
the
terminal
screen
as
a
vertical
bar
"1".
After
the
carriage
return
is
typed,
each
string
of
characters
followed
by
a
carriage
return
is
sent
to
CDOS
or
the
executing
program
as
a
separate
line.
When
the
program
receives
the
line,
the
line
is
echoed
again.
In
the
current
example,
the
user
would
then
see
(assuming
we
are
using
disk
drive
A):
A.ERA *.BAK
A.BATCH
Batch
version
00.05
-STAT
-ASMB
TESTFILE.ABZ
13

(\
Multi-User
BASIC
Instruction
Manual
Attributes
of
Multi-User
CDOS
CDOS
Call
To
Display
Job
Information
The
new
CDOS
system
call
0DFH
will
return
the
job
number,
terminal
number
and
name
of
the
current
user.
To
use
it
call
0005
with
0DFH
in
the
C-
register.
The
current
job
number
will
be
returned
in
the
C-register
and
the
terminal
number
in
the
B-
reg
ister.
These
wi
11
be
encoded
in
ASCI
Ie
If
the
job
is
detached,
there
will
be
no
terminal
number
and
an
asterisk
will
be
returned
in
the
B-register.
The
DE-register
containing
the
address
of
the
user
name
in
memory.
The
last
·character
of
the
name
is
marked
by
having
its
parity
bit
set.
14

(
l,
!
Multi-User
BASIC
Instruction
Manual
Multi-User
CDOS
Commands
Multi-User
CDOS
Commands
15

Multi-User
BASIC
Instruction
Manual
Multi-User
CDOS
Commands
command:
BACKG
This
command
can
be
used
to
place
a
job
in
the
background.
A
background
job
will
only
run
when
all
jobs
not
in
the
background
are
waiting
for
input
or
output.
BATCH
is
a
CD
as
program
which
is,
for
all
practical
purposes,
the
same
as
the
@
command
described
in
the
CDOS
instruction
manual.
A
job
can
be
placed
in
the
background
by
executing
a
BATCH
file
which
includes
the
BACKG
command.as
one
of
its
lines.
If
this
is
done,
then
all
of
the
commands
which
follow
the
BACKG
command
in
the
BATCH
file
will
run
in
the
background.
If
the
command
on
the
last
line
in
the
BATCH
file
completes
execution
and
return
is
made
to
CDOS,
the
foreground
mode
of
operation
resumes.
For
example,
entering
the
following
three
lines
will
cause
BASIC
to
run
in
the
background
in
the
current
job
until
return
is
made
to
CD
as
by
means
of
the
BASIC
command
BYE.
A.BATCH
!BACKG
!BAS SORT.SAV
In
the
above,
"A."
is
the
CDOS
prompt
and
"I"
is
the
BATCH
prompt.
16
Table of contents
Other Cromemco Computer Hardware manuals

Cromemco
Cromemco 32K Bytesaver User manual

Cromemco
Cromemco D+7A I/O User manual

Cromemco
Cromemco BYTESAVER User manual

Cromemco
Cromemco Z80 User manual

Cromemco
Cromemco Dazzler User manual

Cromemco
Cromemco 64KZ User manual

Cromemco
Cromemco 299B User manual

Cromemco
Cromemco ZPU User manual

Cromemco
Cromemco BIART User manual