Download Print this page

Radio Shack TRS-80 Owner's Manual page 119

Mini-disk operation disk operating system disk basic programming language
Hide thumbs Also See for TRS-80:

Advertisement

DISK
BASIC
I
The
z-80
routine
should load
Into
high-RAM and must
not overlay
the
memory
protect area
reserved
when
you
first
entered
basic
(i.e.
,
the
MEMORY SIZE?
prompt).
If
you do
not overlay
basic
or
trsdos,
control
will return
to
basic
after
the
program
is
loaded.
Example
The command:
CMD"L" ."PROG"
will
load
a
program
file
named prog
into
ram.
CMD"L"
*P$
will
load
a
program which
has been
specified as
p$.
CMD"0"
Sort
("Order") an Array
mD"Q'\x,
array
(start)
array
may
be
of
any
length.
This
command
sorts
(orders)
a
one-dimensional
string array,
I.e.,
a
list.
You
may
sort
all
or
part
of
the
array,
depending
on
the
values
you
give
to
x and
start.
Sample
Program
10
CLEAR
10
*
25
+
50
'ROOM FOR
10
WORDS
+
EXTRA
20 DIM A$C95
'LIST OF TEN (0-9)
30
FOR
WD
=
TO
9
m
PRINT "ENTER WORD
*"! WD+1
50
INPUT A$(WD)
60
NEXT
WD
70
NI=10: CMD"0"
>
Hit A$(0)
80
PRINT "HERE
IS
THE
SORTED LIST"
90 FOR
WD=0
TO
9
101

Advertisement

loading

This manual is also suitable for:

Model iii