CHAPTER 8
INTERNAL DISK COMMANDS
Expert programmers can give commands that directly alter the workings of the 1571,
much
as
skilled programmers can alter the workings of BASIC inside the computer with
Peeks, Pokes and Sys calls. It
is
also possible to write machine language programs that
load and run entirely within the 1571, either by writing them into disk memory from the
computer, or by loading them directly from diskette into the desired disk memory buffer.
This
is
similar to loading and running machine language programs in your computer.
As when learning to use Peek, Poke and Sys in your computer, extreme caution
is
advised in using the commands
in
this chapter. They are essentially machine language
commands, and lack
all
of
BASIC'S safeguards.
If
anything goes wrong, you may have to
tum the disk drive off and on again (after removing the diskette) to regain control. Do not
practice these commands on any important diskette. Rather, make a spare copy and work
with that. Knowing how to program a 6502
in
machine language will help greatly, and
you will also need a good memory map
of
the 1571. A brief
1571
map appears below.
Location
OOOO-OOFF
0100-0
IFF
0200-02FF
0300-07FF
ISOO-65C22A
I COO-65C22A
SOOO-FFE5
FFE6-FFFF
1571 MEMORY MAP
Purpose
Zero page work area, job queue, variables
OCR overflQw area and stack (1571 mode BAM side one)
Command buffer, parser, tables, variables
5 data buffers, 0-4 - one
of
which
is
used for BAM
Serial, controller ports
Con tro
II
er ports
32K byte ROM, DOS and controller routines
IMP table, user command vectors
NOTE: The 1571,
as
well
as
other Commodore peripherals,
is
designed to support
interfacing via software command structures. The software commands provided
in
the
1571
allow for a smooth and controllable interface between
tJoJ.e
peripheral and
CPU. Commodore reserves the right to change the ROM and
I/O
structure at any
time.
74