Sharp logo
CP/M on the MZ-80B - 
Disk Parameter Block & Bootstrap Code 
written by Maurice Hawes / SUC/UK
Source: SUC-magazine July 2003, Volume 23 Number 2, pp. 11 - 12  
Sharp Users Club - MZ-80B Section - CP/M via DPB.COM


Most of this issue is taken up with a general look at the CP/M and PCP/M Systems on Sharp MZ-computers. Here, I concentrate on the Disk Parameter Block used in the 5.25" and 3.5" versions of CP/M 2.2 for the MZ-80B, as displayed by DPB.COM. The first example shows 5.25" M-T CP/M 2.2.2.15:-

Parameters for Drive A:

Sectors per Track  
80
Block Shift ( BSH )  
4
Block Mask ( BLM )  
15
Extent Mask ( EXM )  
1
Total Blocks ( DSM )  
169
Directory Entries ( DRM )  
127
Allocation 0 (AL0)  
C0
Allocation 1 (AL1)  
0
Cylinder Offset (OFS)  
1

( CP/M 2.2.2.15, like most CP/M systems, uses 128-byte logical sectors )

80 Sectors per Track seems impossibly high until you realize that, in M-T's CP/M 2.2 on the MZ-80B, a 'Logical Track' extends over BOTH sides of a disk and there are therefore only 35 'Logical Tracks' on the disk as a whole.

Each such 'Logical Track' has a capacity of 128 * 80 Bytes = 10,240 ( 10K ), and the capacity of a whole disk is
128 * 80 * 35 = 358,400 ( 350K ).

BSH = 4 and BLM = 15 both give a block size of 2K ( 2048 bytes ).

EXM = 1 implies that, in this case, a 'Physical Extent' contains TWO 'Logical Extents' and is therefore 32K.

DSM = 169 implies that a disk contains 170 CP/M blocks ( i.e. 340K ).

DRM = 127 implies that the Directory can hold 128 entries.

AL0 - AL1 = 1100 0000 implies that the Directory is allocated the first 2 CP/M blocks ( i.e. Blocks 00 & 01, 4K ).

OFS = 1 implies that Track 0 is reserved for system use, and CP/M Block 00 is at the start of Track 1.

Further Information


The 'User Area' is 340K, but 4K of this is allocated to the Directory, so the actual space available for user files is 336K per disk.

The FILES.COM program in M-T's 5.25" MZ-80B CP/M confirms this figure.

DISCMOD3 reveals the following sections of code on Track 0:-

Bootstrap Loader   Track 0 Sector 00 and Sectors 04 to 07
CCP   Track 0 Sectors 08 to 23
BDOS   Track 0 Sectors 24 to 51
BIOS   Track 0 Sectors 52 to 79


The second MZ-80B example shows the disk parameter block in Robin Hill's 3.5" 80-track version of Microtechnology CP/M 2.2.2.12:-

Sectors per Track  
80
Block Shift ( BSH )  
5
Block Mask ( BLM )  
31
Extent Mask ( EXM )  
3
Total Blocks ( DSM )  
196
Directory Entries ( DRM )  
127
Allocation 0 (AL0)  
C0
Allocation 1 (AL1)  
0
Cylinder Offset (OFS)  
1

( CP/M 2.2.2.12, like most CP/M systems, uses 128-byte logical sectors )

Once again, a 'Logical Track' extends over BOTH sides of the disk, so there are only 80 'Logical Tracks' on a 3.5" 80-track double-sided disk. The overall disk capacity is therefore
80 * 128 * 80 = 819,200 ( 800K ).

BSH = 5 and BLM =31 both give a block size of 4K ( 4096 bytes ).

EXM = 3 implies that, in this case, a 'Physical Extent' contains FOUR 'Logical Extents' and is therefore 64K.

DSM = 196 implies that a disk contains 197 CP/M blocks ( i.e. 788K ).

DRM = 127 implies that the Directory can hold 128 entries.

ALO - AL1 = 1000 0000 implies that the Directory is allocated only the first CP/M block ( i.e. Block 00, 4K ).

OFS = 1 implies that Track 0 is reserved for system use, and that CP/M Block 00 is at the start of Track 1.

Further Information


The 'User Area' is 788K, but 4K of this is allocated to the Directory, so the actual space available for user files is 784K per disk.

FILES.COM program in this 3.5" version of MZ-80B CP/M confirms this figure.

DISCMOD3 reveals the following sections of code on Track 0:-

Bootstrap Loader   Track 0 Sector 00 and Sectors 04 to 07
CCP   Track 0 Sectors 08 to 23
BDOS   Track 0 Sectors 24 to 51
BIOS   Track 0 Sectors 52 to 79

NOTE ON 'SPIN8.COM' for Microtechnology CP/M version 2.2.2.12


This 3.5" disk boots CP/M 2.2.2.12 because Robin Hill in Australia happened to have that version rather than the 2.2.2.15. The differences are minor but they include the address of the 'Spin Time' byte ( which is at $F0C0 in v.2.2.2.12, but is at $F0C2 in v.2.2.2.15 ). These two systems therefore need different SPIN8.COM programs.


Go to the top of this page      Back to page CP/M on the MZ-80K      Get next page - CP/M on the MZ-80A      Home     

last updated August 18, 2003
SUC / UK: Maurice Hawes

khmweb barrierefreies webdesign Berchtesgaden