Changes
CP/M 3.0
,More detail on implementing block devices
Using "drvtable" gets the list of DPH addresses for each drive. This is actually fixed at FE2F and is referenced by the XBIOS.
Amstrad have extended implemented the extended DPH (these appear before in the Digital Research sample BIOS. The ten bytes before a DPH)give the addresses of read/write functions: * -10,-9 - address of a DD WRITE SECTOR (XBIOS) compatible sector write function* -8,-7 - address of a DD READ SECTOR (XBIOS) compatible sector read function* -6,-5 - unknown address of drive select function, but does call DD LOGIN (XBIOS) if successful* -4,-3 - unknown function, seems to be address of drive init, calls RETfunction (never called)* -2,- physical drive number (for B: this is 0 on a single-drive system and 1 on a two-drive system)* -1 - unknown usedrive type
The XBIOS calls these and assumes bank 0 is active. If you write a driver in TPA space you will need to transition to and from bank 1 using selbnk etc.
The parameters for the read / write functions are at 0BEF0h:
DB @adrv ;Selected logical drive
DB @rdrv ;Selected physical drive (from the byte at DPH-2)
DW @trk ;Track passed to SETTRK.
DW @eect ;Sector passed to SETSEC.
DW @dma ;DMA address passed to SETDMA.
DB @cnt ;Multiple I/O count passed to MULTIO
DB @dbnk ;DMA bank passed to SETBNK
=== PALETTE.COM ===