MS-DOS Disk Structure Analysis with DEBUG


The information which we have been considering can be applied to specific disk structures. This helps to provide an understanding of how the Operating System can perform the required "logical" to "physical" I/O translation. It also can provide the basis for low-level disk maintenance and recovery (although that is beyond the scope of the material presented here).


Loading Physical Sectors into Memory using DEBUG


Loading and Examining a Sample Boot Sector

C:\TEMP>DEBUG
-L0000 2 0 1
-D0000 001F
1026:0000  EB 3C 90 4D 53 44 4F 53-35 2E 30 00 02 04 01 00   .<.MSDOS5.0.....
1026:0010  02 00 02 00 00 F8 F8 00-11 00 10 00 11 00 00 00   ................
Boot: sector 0
FAT (2 copies): 2xF8h=1F0h; sectors 1 - 1F0h
Directory: 20h sectors; sectors 1F1h - 210h
File Allocation Space:4 sectors per allocated clustersectors 211h +

For this specific disk, we can load and examine the (beginning of) the directory space given the previously derived information:

-L0000 2 1F1 1
-D0000 00FF
1026:0000  49 4F 20 20 20 20 20 20-53 59 53 07 00 00 00 00   IO      SYS.....
1026:0010  00 00 00 00 00 00 00 28-89 16 02 00 96 82 00 00   .......(........
1026:0020  4D 53 44 4F 53 20 20 20-53 59 53 07 00 00 00 00   MSDOS   SYS.....
1026:0030  00 00 00 00 00 00 00 28-89 16 13 00 12 92 00 00   .......(........
1026:0040  43 4F 4D 4D 41 4E 44 20-43 4F 4D 20 00 00 00 00   COMMAND COM ....
1026:0050  00 00 00 00 00 00 00 28-89 16 40 00 E5 BA 00 00   .......(..@.....
1026:0060  43 4F 4E 46 49 47 20 20-53 59 53 20 00 00 00 00   CONFIG  SYS ....
1026:0070  00 00 00 00 00 00 F9 96-CD 22 18 0A 2A 01 00 00   ........."..*...
1026:0080  41 55 54 4F 45 58 45 43-4F 4C 44 20 00 00 00 00   AUTOEXECOLD ....
1026:0090  00 00 00 00 00 00 2E 77-66 1D 83 A1 45 01 00 00   .......wf...E...
1026:00A0  44 4F 53 20 20 20 20 20-20 20 20 10 00 00 00 00   DOS        .....
1026:00B0  00 00 00 00 00 00 1A 40-99 19 53 00 00 00 00 00   .......@..S.....
1026:00C0  4D 53 2D 44 4F 53 5F 35-20 20 20 28 00 00 00 00   MS-DOS_5   (....
1026:00D0  00 00 00 00 00 00 56 41-99 19 00 00 00 00 00 00   ......VA........
1026:00E0  57 49 4E 41 32 30 20 20-33 38 36 20 00 00 00 00   WINA20  386 ....
1026:00F0  00 00 00 00 00 00 00 28-89 16 83 04 85 24 00 00   .......(.....$..