Format a track
Function AddressDescription
DD_FORMAT 016CFormat a track


Format a track. (Uses the uPD765A format track command.)

Entry Parameters

Register Content
B Page for 0xC000…0xFFFF
C Unit 0 or 1
D Logical track, 0 base
E Filler byte, usually 0xE5
HL Address of format buffer
IX Address of XDPB

Exit Parameters

If OK:
Carry true
A corrupt
Carry false
A = Error code
BC DE HL IX corrupt, all other registers preserved.

Format buffer

The format buffer contains 4 bytes for each sector:

Byte Content Range
CTrack Number0…39
HHead NumberAlways 0 on a standard +3 single sided drive
RSector Number0…255
NLog2(sectorSize)-72 for 512 byte sectors
Last modified November 24, 2021: Low level operations (11836cf)