Commodore 128 Programmer's Reference Manual page 708

Hide thumbs Also See for 128:
Table of Contents

Advertisement

698
COMMODORE 128
e) Additional Information. This is how the user should select between a
*-*
1541 and 1571 Drive. To access the back side of an MFM disk set bit 7
of VICSECTOR. To perform a write operation, the user will have to do
j j
so in their application.
LJ
IV. 5.a) Subfunction 5: Interrogate 1541 or 1571 Disk Drive
b) A = 4
j
L = 5
L
VICDRV = (8-11)—Disk drive device number variable
c) VICDATA = lower four bits returns status for FAST read/write
j" i
(same as previous VICDATA Disk error codes, which
jj
are listed in the Disk Error Status table on the next page).
= upper four bits return sector size for MFM disks
d) This subfunction interrogates the disk drive for the disk sector size
I j
(MFM or GCR) and the drive status. In addition, this subfunction
*->
initializes the FAST variable, closes and reopens the channel for the
corresponding drive, and clears the drive status.
j j
IV. 6.a) Subfunction 6: Query to Disk
LJ
b) A = 4
L = 6
VICTRACK = (1-35)—Variable for track number on disk
J
VICSECTOR = (0-21)—Variable for sector number on disk
VICDRV = —Variable for disk drive device number
c) If error-free
j
VICDATA = lower four bits returns status for FAST read/write
*-]
= upper four bits return sector size for MFM disks and the
subfunction inputs 6 bytes into a memory buffer starting at
j I
location $FE00 (and ending at $FEFF). These 6 bytes are
LJ
defined as :
1) $FE00-TRACK STATUS (on track below)
I |
2) $FE01-Number of Sectors
Lj
3) $FE02-Logical Track
4) $FE03-Minimum Sector Number (on this track)
j j
5) $FE04-Maximum Sector Number (on this track)
LJ
6) $FE05-Physical Interleave
If an error occurs:
VICDATA = 11 ($0B) if disk in drive has been changed
^
VICDATA = 12 ($0C) if drive is not a fast (1571) disk drive
.
VICDATA = 13 ($0D) if channel error occurs
VICDATA = 15 ($0F) if device is not present
U
d) This subfunction queries the disk, and returns the disk status and sector
size (if MFM format). In addition, the buffer located between $FE00
j j
and $FEFF receives 6 data items as described above.
LJ

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents