EasyManua.ls Logo

Commodore Plus 4 - Page 353

Commodore Plus 4
464 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...
The
Disk
Drive
341
not
allocated,
a
DIRECTORY
performed
prior
to
running
the
program
shows
one
less
free
block
than
one
performed
after
running
the
program.
10
0PEN15,8,15,"I"
20
IPDS<>0THElTPRI]SrTDS$:G0T080
30
OPE1T1,8,2,"#"
40
IPDSOOTHElTPRINTDSiiGOTOSO
50
PRINT//WHICHTI^CK,SECTOR//;:I]SrPUTT,S
60
PRI]STT#1S//B-F://;O;T;S
70
IPDSOOTHENPRIHTTDSI
80
CL0SEl:CL0SE15
Line-by-Line
Explanation
10
Open
the
command
channel
and
initialize
the
disk.
20
Check
for
error.
If
one
is
found,
exit.
30
Open
the
direct
access
channel.
40
Check
for
error.
If
one
is
found,
exit.
50
Ask
which
track
and
sector
to
use.
60
Free
the
specified
sector.
70
Check
for
error.
If
one
is
found,
exit.
80 Close
the
files.
Buffer
Pointer
(B-P)
The
buffer
pointer
command
designates
the
position
in
the
1541
buffer
to
access.
This
command
can
be
used
before
reading
from
the
buffer
to
start
GETting
bytes
from
a
position
other
than
the
beginning
of
the
buffer.
B-P
can
be
used
before
writing
to
the
buffer
to
start
writing
at
a
position
other
than
the
beginning.
The
syntax
for
the
buffer
pointer
command
is
PRINT*
filenumber,"B-P:";
channel;position
where
filenumber
is
the
logical
file
number
of
the
command
channel
and
channel
is
the
channel
number
of
the
direct-access
channel.
The
position
can
be
any
byte
in
the
buffer
(0
to
255).
Example:
This
example
reads
the
first
sector
of
the
directory,
moves
the
buffer
pointer
to
the
first
byte
of
the
first
file
name
in
the
directory,
and
prints
out
the
first
file
name.