
Start-Up
Make sure all
floppy disk
drives are empty and all equip-
ment is
off.
1
.
Turn
on all peripheral equipment (such
as a printer),
except
the hard disk.
2. Hard disk
users: Turn
on the primary hard disk drive.
3.
Turn on the computer.
4. Insert
a system diskette into Drive
and close the
drive
door. TRSDOS
displays its start-up message.
5. TRSDOS
prompts you for the
date.
Enter
it in the
mm/dd/yy
format.
6. The
following
system prompt will
appear
on your
screen:
TRSDOS
Ready
Now,
you
can
type in a TRSDOS
command.
7.
To start
BASIC,
type:
BASIC
(ENTER)
and
you see
the BASIC
prompt:
Ready
represents
a value that
you supply.
Information within
brackets
is optional.
Now,
you can type in a BASIC
command.
This Quick
Reference
Guide is
divided into two
sections:
TRSDOS and
BASIC.
Information
which
is non-shaded
(like this)
pertains to:
•
TRSDOS
intermediate
commands
and utilities
•
BASIC
statements
Information
which is shaded
like
this pertains to:
•
TRSDOS
advanced
commands
and utilities
•
BASIC functions

Commands
and
Utilities
Those
parts
of
the
command
line
that
you
must
enter
are
hiahliqhted.
Information
that
is
upper-case
should
be
typed
in
exactly
as
is.
Information
that
is
lower-case
represents
a
value
that
you
supply.
Information
within
brackets
is
optional.
APPEND
source
[TO]
destination
[(ECHO.STRIP)]
Adds
one
disk
file
onto
the
end
of
another.
ATTRIB
iile
(USER
= "password"OWNER
=
"password"
PROT
=
level,
VIS.INV)
Changes
the
protection
of a
file.
The
/eve
_can
be
EXEC
READ
UPDATE,
WRITE,
RENAME,
REMOVE,
or
FULL.
,,..,..
„
„
ATTRIB
CUSTFILE/DATsi
(USER=
>
OWNER="BOSSMAN"
,PROT
= READ
tVIS)
ATTRIB
[drive]
(LOCK,UNLOCK,MPW
=
"password",
NAME
=
"disk
name",
PW
=
["password"])
Changes
the
protection
of
files
on
a
drive
n
ATTRIB
-.1
(NAME="DATA"
,PW="SECRET
.
MPW="BOSSMAN"
)
AUTO
[drive,
?;drive,
=
drive]
[*]
[command
line]
Stores
a
command
line
for
automatic
execution
each
time
TRSDOS
starts
up.
(AUTO
by
itself
deletes
the
current
AUTO
command
line.)
AUTO
BASIC
AUTO
*D0
INIT/JCL.l
BACKUP
[filel
source
drive
[TO]
destination
drive
5MPW
=
1
?assword",SYS,INV,MOD,QUERY
=
YES,OLD,
NEW,
X,
DATE
=
"date")]
Duplicates
a
system
or
data
diskette,
(file
can
be
a
partial
name.)
BACKUP
;
si
BACKUP
(MOD.
QUERY,
MPW=
"
SECRET
"
BOOT
[
(CLEAR
)-
(ENTER
), 3D]
Resets
the
system.
BOOT
BUILD
iile
[(HEXAPPEND)]
xocnnQ
Creates
an
input
file
for
JCL,
KSM,
and
other
TRSDOS
commands.
BUILD
MYPROGA/FI>(;0
BUILD
DISPLAY/BLD
(HEX)
CLICK/FLT
SET
device
[TO]
CLICK/FLT
FILTER
*KI
device
Establishes
the
key-click
filter.
II

DUMP file (START
=
address,
END
=
address,
TRA
=
address,
ASCII, ETX
=value)
Copies
an
area of memory to a
disk
file.
DUMP
ROUTINE/CMD
<START=X'700Q' .END
=
X
'8Q0Q
' .
TRA=X'7000')
FILTER device
[USING] phantom device
Filters
data
to or from a
device, using a
filter program.
FILTER *PR USING
*DU
FORMAT
:drive
(ABS.NAME
=
"disk
name",
MPW
=
"password", SDEN.DDEN,
CYL
=
number,
QUERY
=
NO)
Formats a blank or
old disk for use.
FORMAT
FORMAT
: 1 (
NAME= "DATA3"
.
MPW="SECRET"
FORMS
[(DEFAULT,
ADDLF.CHARS
=
number.FFHARD,
INDENT
=
number, LINES
=
number,
MARGIN
=
number,
PAGE
=
number,
QUERY,
TAB,
XLATE=X'aabb')]
Sets up
printer options.
FORMS
(MARGIN=10.CHARS=80.INDENT=G)
FORMS/FLT
SET *PF [TO]
FORMS/FLT
FILTER *PR *PF
Prepares the Printer
Filter (*PF) for use.
FREE [: drive] [(PRT)]
Lists free space and number
of files on each disk; if
drive
is
specified, displays space map of that
disk.
FREE FREE :0 (PRT)
JOBLOG
ROUTE *JL [TO]
file
ROUTE *JL [TO] device
Establishes the Joblog device (*JU,
which sends
certain
information to a
file or device.
ROUTE *JL TO
LISTER/JBL
ROUTE
*JL TO
*PR
KSM/FLT
SET device KSM/FLT [USING] file
[(ENTER
=
value)]
FILTER *KI device
SET *DU KSM/FLT USING ROUTINE/KSM
FILTER *KI *DU

LIB
Displays
library
commands.
LIB
LINK
device
1
[TO]
device2
Links
two
logical
devices, :
LINK
#D0
*PR
LIST
Me
[(ASCII8,NUM,HEX,
TAB
=
number,
PRT,
LINE
=
number,
REC
=
number,
LRL
=
number)]
Lists
contents
of
a file
to
the
display
or printer
LIST
TESTFILE:0
LIST
MONITOR/CMD
(PRT)
LOAD
[(X)]
file
Loads
a
program
file
into
memory.
LOAD
STATUS/CMD
LOAD
(X)
PROGRAM/CIM
MEMDISK7DCT
SYSTEM
(DRIVE =
drive.DRIVER
=
"MEMDISK")
Adds
to
the
system
a
pseudo
floppy
drive
which
keeps
its
files
in
memory.
SYSTEM
(DRIUE=2»DRIUER="MEMDISK")
MEMORY
[(CLEAR
=
value,
HIGH
=
address,
LO
W
= address,
ADD
=
address,
WORD
=
word
BYTE =
byte, GO
=
address)]
Reserves
a
portion
of
memory,
sets
or
displays
current
HIGHS
and
LOW$,
modifies
a
memory
address,
or
jumps
to
a specified
memory
location.
MEMORY
MEMORY
<ADD =
X'E100'
,
WORD=X
'3E0A
'
PATCH
file
(patch
commands)
,
Changes
the
contents
of
a
disk
file.
PATCH
MONITOR/CMD
(X'E100'=C3
SB
00)
PATCH
file!
USING
Iile2
[(YANK,REMOVE)]
Makes
changes
contained
in
file2
to
filet
PATCH
BACKUP/CMDsB
USING
SPECIAL/FIX
PURGE
[file]:drive
[(QUERY=NO,MPW
=
"password"
INVSYS,
DATE =
"date")]
Deletes
files,
(fife
can
be
a partial
name.)
PURGE
:0
(MPW="SECRET")
PURGE
/BAS:1
(Q=N)
REMOVE
iile
[file]
...
Deletes
files
from
the
directory.
REMOVE
ALPHA/DAT
:0
BREAKER/DAT
:

REMOVE device
[device] ...
Removes devices
from the
device table.
REMOVE *LU
RENAME filel
[TO] file2
RENAME device 1 [TO] device2
Changes the name of a
file or
device.
RENAME
TEXT/DAT :0
TO OLD/DAT
RENAME
*UD TO
*TX
REPAIR :drive
Updates
system information
on disks
which were
formatted under
Model I TRSDOS.
REPAIR :1
RESET device
RESET me
Returns
a
device to
its original start-up
condition.
Closes
an open file.
RESET *PR
RESET
PRINTER/DAT
ROUTE
device 1
[TO] device2
ROUTE device [TO] file
[(REWIND)]
ROUTE device
(NIL)
Routes a
device to
another device, to a
disk file, or to
nothing (NIL).
ROUTE *PR
*D0
ROUTE #PR TO
PRINTER/DAT
[RUN] [(X)] file [(command
text)]
Loads and executes a
program, command
text is
optional values
the program may require.
RUN CONTROL/CMD
CONTROL/CMD
SET device
[TO] driver file [(parameters)]
Assigns
a
driver program to a
device, parameters
are
optional values the
driver program may
require.
SET
*SP TO SERIAL/DRV
SET phantom device [TO]
filter file [USING]
[parameters]
Assigns a filter program to a
phantom device.
parameters
are optional values the
filter program may
require.
SET #LC TO TRAP/FLT
SETCOM
[(DEFAULT,
BAUD
-
number, WORD
-
number, STOP
=
number,
PARITY
-
switch, QUERY,
BREAK=value.EVEN.ODD)]
Sets up
RS-232C communications or
display
status.
SETCOM <BAUD=300
,W0RD=8
,STOP=i
.
PARITY=OFF)

Error
Messages
Number
Message
Explanation/
Action
7
X'07'
Attempted to
read
locked/deleted
data
record
Check for error
in
program
6
X'06'
Attempted
to read
system data
record
Check for
error in
program
5
X'05'
Data record
not
found
during read
Try again; use
another disk;
refor-
mat
old disk
13
X'OD'
Data
record not
found during
write
Try again;
use
another disk
39
X'27'
Device in use
Reset
device in use
before
REMOVEing it
8
X'08'
Device not available
Check
device
specifi-
cation; make
sure
peripheral
is ready
30
X'1E'
Directory
full— can't
extend file
Copy files to
new
disk
17
X'11'
Directory read
error Try
another drive
or
disk
18
X'12'
Directory write error
Try another
disk
27
X'1B'
Disk space
full Write
file
to
a disk
with more
available
space
28
X'1C
End
of file
encountered
Check
for error in
program
63
Extended error Error code
is in HL
register
25
X'19'
File access denied Use
correct pass-
word; use
no pass-
word for unprotected
file
41
X'29'
File
already open Use
RESET
to
close
the file
24
X'18'
File not in directory Check
spelling of
filespec
38
X'26'
File not open Open file before
access
20
X'14'
GAT read error Try another drive
21
X'15'
GAT write error Try another drive or
disk
22
X'16'
HIT read error Try another drive
1Q

23
X'
17'
HIT write
error Try another drive or
disk
37
X'25'
Illegal access
attempted to pro-
tected file
OWNER password is
required
for the
requested
access
32
X'20'
Illegal drive number Drive is not
in system
or not ready
for
access
19
X'13'
Illegal file name Use proper filespec
syntax
16
X'10'
Illegal logical file
number
Check for error in
program
34
X'22'
Load file format error Attempt
was made to
load a non-program
file
3
X'03'
Lost data during read Try another drive or
disk
11
X'OB'
Lost data during
write
Try another
drive or
disk
42
X'2A'
LRL open fault
COPY file to
another
file that has the spec-
ified
LRL
33
X'21'
No device space
available
REMOVE non-
system devices to
provide
more space
26
X'lA'
No directory space
available
Use a different
disk
or REMOVE
unwanted files
X'OO'
No error Check for error in
program
1
X'or
Parity error
during
header read
Try another drive or
disk
9
X'C)9'
Parity error during
header write
Try another drive or
disk
4
X'04'
Parity error during
read
Try another drive or
disk
12
X'OC
Parity error during
write
Try another drive or
disk
31
X'1F'
Program not found Check
spelling of
filespec; check for
proper disk in drive
40
X'28'
Protected system
device
System devices can-
not
be
REMOVEd
29 Record number out
X'lD'
of range
Provide correct
record
number or try
another copy
of the
file
14

2
X'02'
Seek error during
read
Set step rate with
SYSTEM command
or try another
drive or
disk
10
X'OA'
Seek
error during
write
Set step rate with
SYSTEM command
or try another drive
or
disk
—
Unknown error code Check for error
in
program
14
X'OE'
Write fault on
disk
drive
Try another disk or
drive
15
X'OE'
Write protected
disk Remove write-
protect tab or write
enable disk using
SYSTEM command
15

FOR/NEXT
FOR
variable
=
initial value TO iinal
value [STEP
increment
Establishes
a
program
loop.
20 FOR
H=l TO 2 STEP
-2
FEE
(dummy
number)
Returns
the amount
of free memory
space.
PRINT FRE<44)
FEE
(dummy
string)
Returns
the amount of free
string space.
PRINT
FRE<"44">
GET
buffer [.record
number]
Gets
a record from
a direct
disk file and places it in
a
buffer.
GET
i GET
t f 25
GOSUB
line
Goes
to a subroutine,
beginning
at the
specified line.
GOSUB
1000
GOTO line
Goes
to
the specified
line.
GOTO
100
HEX$ (number)
Calculates
the
hexadecimal
value of number.
PRINT
HEX$(30),
HEX* (50),
HEX*<90>
IF..
.THEN..
.ELSE
IF
expression THEN
statement(s)
or line ELSE
[statement(s)]
or [line]
Tests
a conditional
expression
and makes
a decision
regarding
program
flow.
IF
X > 127
THEN
PRINT
"OUT
OF
RANGE"
: END
IF A
< B
THEN PRINT
"A < B" ELSE
PRINT
"B < A"
INKEY$
Returns
a keyboard
character.
A*
=
INKEY*
INP(porf)
Returns
the
byte read
from a
port. Port
may
be any
integer
from
to
255.
100
A=INP(255)
21

LIST
[startline]
-
[endline]
Lists
program lines
to
the display.
LIST 50
LIST
50-85
LIST-227
LLIST
[startline]
-
[endline]
Lists program
lines
to
the line printer.
LLIST 780
LLIST
50-
LLIST.
LOAD
filespec
[R]
Loads filespec,
a BASIC program, into
memory. If R is
used, the program is
RUN automatically.
LOAD
"PR0G1/BAS:2"
LOAD
"PR0G1/BAS"
LOC buffer
Returns the
current record
number.
IF L0C(1)>55
THEN END
LOF
buffer
Returns
the end-of-file record number.
Y
=
L0F(5)
LOG(number)
Computes
the natural logarithm of number.
PRINT
LOGO,
14159)
Z
=
10*LOG(PS/P1)
LPOS
(number)
Returns the position
of the line printer's print
head
within
the line printer's
buffer.
100
IF LPOS(X) >G0THEN PRINT CHR$(13)
LPRINT
data...
Prints
data at the printer.
LPRINT
(A
*
2)/3
LPRINT USING
format; data,...
Prints
data at line printer, using
a
specified
format.
LPRINT
USING
"####,#";
2,17
LSET
field name
=
data
Sets
dafa in a direct-access
buffer field name. The
data is left-justified.
LSET
NM$
=
"JIM CRICKET, JR."
MEM
Returns
the amount of
memory.
PRINT
MEM
23

ON expression GOTO line, line...
Goes to the line
specified by the
value of
expression.
ON X GOTO 190, 200,
210
OPEN mode, butter, filespec
[.record
length]
Opens a disk file
in the specified
mode. (O for
sequential output, I for
sequential input, D or
R for
direct input/output, and E for
sequential
extend).
OPEN
"0"
> 1
>
"CLIENTS/TXT"
OPEN "D" »
5, "TESTED/BAS" ,
64
OPTION BASE n
Sets n as the minimum
value for an
array subscript.
OPTION BASE
1
OUT port data
byte
Sends data byte to a
machine output port.
100
OUT 32,100
ftEK(memory
location)
Returns
a
byte
from memory location.
A
=
PEEK (&H5A00)
POKE memory
location, data byte
Writes a data byte
into
memory location.
10 POKE 153G0,
131
tOS(number)
Returns the
position of the cursor. Number
is a dummy
argument.
PRINT TAB!40) POS(0)
PRINT
@
location,
PRINT
@
(row,
column).
Specifies
where printing
is to
begin.
PRINT TAB(n)
Moves the cursor to the n
position on the
current line
(or
on succeeding lines if you
specify TAB
positions
greater than 79).
PRINT
TAB(5)
"TABBED 5"
TAB(25) "TABBED
25"
PRINT# butter, iteml, item 2,...
Prints
data items
in
a
sequential disk file.
PRINTai
» A
,B
PUT butter [, record]
Puts
a
record in
a
direct-access file. Buffer
is the
number used to OPEN
the file.
PUT
1 PUT 1 ,
25
25

ROW (number)
Returns the row position of
the cursor.
Number is a
dummy argument.
X
=
ROW(Y)
ROVf(number)
Returns the row
position of the cursor.
Number is
a
dummy
argument.
X
=
ROW(Y)
RSET field name
=
data
Places dafa in a direct-access
buffer field name.
RSET NM$
=
"JIM
CRICKET, JR."
RUN [line]
RUN tilespec [,R]
RUN or RUN line runs the
program that is in
memory.
RUN filespec loads a
program from
disk, then runs it.
RUN
"PROGRAM/A" RUN
"EDITDATA", R
SAVE tilespec
[A]
[-P]
Saves a program in a
disk under filespec.
A causes
the file to be stored in
ASCII format.
P causes the
file
to be stored
in an encoded binary
format.
SAVE
"FILE1/BAS, J0HNQD0E:3"
SAVE
"MATHPAK/TXT" , A
SGN (number)
Determines
number's sign. If number
is positive, SGN
returns 1 . If it is
negative, SGN
returns
-
1.
If it is zero,
SGN
returns 0.
Y
=
SGN (A
*
B)
SlN(number)
Computes the sine of
number; the number must be
in
radians.
PRINT SIN(7.9G)
SPACES$(num£>er)
Returns
a string of number
spaces. The number must
be from to
255.
PRINT "DESCRIPTION" SPACESM)
SVC(number)
Prints a line of number blanks.
The number must be
from to 255.
PRINT "HELLO"
SPCU5) "THERE"
SQR(n
umber)
Calculates the square root of
number.
PRINT S0R< 155.7)
27

STOP
Stops program execution.
STOP
STRING$(num£>er,
character)
Returns
a string of
the
specified number of characters.
The number
must be from to
255. The character is
a
string or an ASCII code.
B*
=
STRINGS (25, "X")
PRINT STRING<50, 10)
STR$(numb&r)
Converts number into
a
string. If the number is
positive. SIRS places
a
faiank before the string.
SWAP
variable 1, variable2
Exchanges
the values of two variables.
SWAP
Fl*t)
F2*
SYSTEM
[command]
Returns
to
TRSDOS.
If you
specify
a command,
TRSDOS executes
it and returns you to BASIC.
SYSTEM
SYSTEM "DIR"
TAB
(number)
Spaces
to
position number on the
display. The number
must
be
from
to
255.
PRINT
A*
TAB(25) B*
Tkn(number)
Computes the tangent of number.
The number must
be
in radians. If it
is
in degrees,
use TAN (number
*
.
1
1 745329). The result is always single
precision.
PRINT TAN(7.96)
TIMES
Returns the time (in
24-hour format).
AS
=
TIME$
TROFF
Turns
off the trace function.
TROFF
TRON
Turns
on the trace
function (to follow program flow).
TRON
VSR[digit] (expression)
Calls the user's
assembly-language
subroutine
identified
by digit and passes
the result of expression.
X
=
USR5(Y)
OP.