..
BURSTWRITE
send-cmd-string;
if
device-fast then
repeat
serial-out;
repeat
send-byte;
until last-byte;
serial-in;
clock-low;
read-err;
clock-high;
until last -sector;
else
write-1541 ;
EXPLANATION
OF
PROCEDURES
(*determine speed*)
(*repeat for multi-sector*)
(*serial port out*)
(*repeat for sector-size*)
(*send byte*)
(*last byte ?*)
(*serial port in*)
(*ready for status
*)
(*controller error ?*)
(*restore clock*)
(*untillast sector*)
(*unit write*)
send-cmd-string sends one byte
of
the command to determine whether the drive is fast
or
slow.
toggle-clock changes the state
of
the clock line.
clock-hi changes the state
of
the clock to logic 1.
clock-Io changes the state
of
the clock to logic 0.
wait-byte polls the 6526 for a byte ready.
read-error calls toggle-clock and wait-byte, then returns
to
the main
if
there are
no errors.
store-data
last-byte
last-sector
serial-in
read-err
serial-out
stores the data in a particular memory location.
depending on sector size, will increment and compare value to sector
size.
decrements the number
of
sector transfers requested and stops when
done.
sets the 6526 serial port and driver circuit to input mode.
calls wait-byte and evaluates the status
of
the previous controller job.
sets the 6526 serial port and driver circuit
to
output mode.
90