Download Print this page

Radio Shack TRS-80 model III Owner's Manual page 101

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

Advertisement

TRS-80
MODEL
III
DISK
SYSTEM
Example
CMD"J"
t
"11/30/80"
»
D$
Returns
the
day
of
the
year
in
d$.
CMD"J"
*
"-79/300"
f
D$
Returns
the
month,
day, year,
equivalent
in
d$
(the
date for the
300th
day
of 1979).
Sample
Program
10
CLEAR
50
20
LINE INPUT'ENTER FIRST DATE (HM/DD/YY)
"5
FD$
30
LINE INPUT'ENTER SECOND DATE (MM/DD/YY)
"
?SD$
40
CMD"J"
t
FD$, Dl$
50
CMD"J"
*
SD$> D2$
60
Yl
=
VAL<RIGHT$(FD*»2>)
70 Y2
=
UAL(RIGHT$(SD$,2))
80
Jl
=
VAL(RIGHT$(D1**3)
)
90 J2
=
0AL<RIGHT$<D2$*3>)
100
SI
=
Yl*365
+
Jl
110 S2
=
Y2*365
+
J2
120
PRINT "THE INTERVAL BETWEEN DATES
IS"
5
130
PRINT ABS(S1-S2); "DAYS
"
!
140
PRINT "(IGNORING LEAP-YEARS
)
"
150
INPUT "<ENTER>
TO
CONTINUE"!
A$
1S0
GOTO
20
CMD"L"
Load
Z-80 Routine
into
RAM
mB'v\fQutme
roiiiinek a
string
expression
containifig
a
file
specification
for
a
z-so
routine or
program
created
by
the
dump
command.
If
routine
is
a
string
constant,
it
must
be enclosed
in
quotes.
cmd"L"
loads
a
z-80
(machine-language)
routine
into
ram.
It
would
normally
be used
to
load a
z-80
subroutine
which
is
to
be accessed
directly
from
basic.
100

Advertisement

loading