EasyManua.ls Logo

Commodore 16 - CHAPTER 5: Numbers and Calculations

Commodore 16
94 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
EXAMPLES
DIRECTORY
DIRECTORY
Dl
(
U9, "WORK"
DIRECTORY "AB*"
DIRECTORY
DO, "FILE ?.BAK"
List all files on the disk
Lists the
file
on disk drive
unit
9
(8
is
the
delaull). drive
1 ,
named
WORK
Lists all files starting with
the
letters
"AB", like ABOVE. ABOARD,
etc.
The
? Is a wild-card that matches
any
single
character in thai
position:
FILE 1 .BAK, FILE 2.BAK.
FILE 3.BAK all
match the
siring.
NOTE: To print out the OIRECTORY ot drive
0,
unit
8, use the
following.
LOAD"$0",8
OPEN4,4:CMD4:UST
PRINT#4;CLOSE4
DLOAD
DLOAD
"filename"
[,Ddrive#| [,Uun«*|
This command loads
a program from disk into current memory.
(Use
LOAD to load programs
on lape.) You must supply a program name.
EXAMPLES
DLOAD "DTRUCK"
DLOAD
(A$)
Searches the disk tor the program
DTRUCK" and LOADS it.
LOADs a
program trom
disk whose
name is in
the
variable
AS. You will
get
an error it A$ is empty.
100
1
r
The DLOAO command can
be
used within a BASIC program lo find and
RUN another program on disk. This is
called
chaining.
DSAVE
DSAVE
filename" |,Ddrrve#]
[,Uunrt#]
This command stores
a
program on
disk
(Use SAVE to
store
programs
on tape.) You must
supply
a
program name.
EXAMPLES
DSAVE "DDAY"
DSAVE (AJ)
DSAVE "PROG
3",
D0.U9
SAVES the program "DDAY" to disk
SAVEs to disk program whose
name
is In the variable AS.
SAVES Ihe program "PROG
3"
lo the
disk
drive with
a
unit number
of 9.
HEADER
HEADER
"dtskname" ,Ddrlve# [,Iid
#|
|,ON
Uunit#]
Before
you can use a new
diskette for
the
firsl time
you
must format it
with Ihe HEADER command.
If
you
want
to
erase an entire
diskette
for
re-use you can use the HEADER command. This
command divides
the
disk
Into
sections
calleo blocks, and
it creates
a table
of
contents,
called
a
directory
or
catalog, on the disk The d<skname can be
any
name up
to
1
6 characters long The
i
d. number
is
any 2
characters.
Give
each disk
a unique id
number
Be
careful when
you
HEADER
a
disk
because
Ihe HEADER command erases all sioreo data Giving no
id. number al'-ows you to perform a quick header. The o(d
id. number
Is used. You can on'y use ihe
quick header
method If
the disk
was
previously formatted, since the quick header only clears out the
dkecto'y rather than formatting ihe disk.
101

Other manuals for Commodore 16

Related product manuals