More boot sector README updates

This commit is contained in:
Jeff Parsons 2017-07-01 13:20:05 -07:00 • committed by Jeff Parsons
commit 6d8090649f
3 changed files with 203 additions and 109 deletions

View file

@ -78,6 +78,41 @@ CHKDSK reports:
### PC-DOS 1.00 Boot Sector
The boot sector of the PC-DOS 1.00 disk image contains the following bytes:
00000000 eb 2f 14 00 00 00 60 00 20 37 2d 4d 61 79 2d 38 |./....`. 7-May-8|
00000010 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |1...............|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 fa 8c c8 8e d8 ba 00 00 8e d2 bc 00 7c fb a1 |.............|..|
00000040 06 7c 8e d8 8e c0 ba 00 00 8b c2 cd 13 72 41 e8 |.|...........rA.|
00000050 58 00 72 fb 2e 8b 0e 02 7c 51 bb 00 00 33 d2 b9 |X.r.....|Q...3..|
00000060 08 00 be 01 00 56 b0 01 b4 02 cd 13 72 22 5e 58 |.....V......r"^X|
00000070 e8 e7 00 2b c6 74 14 fe c5 b1 01 be 08 00 3b c6 |...+.t........;.|
00000080 73 04 8b f0 eb 01 96 56 50 eb dd 2e ff 2e 04 7c |s......VP......||
00000090 be 44 7d b8 42 7d 50 32 ff ac 24 7f 74 0b 56 b4 |.D}.B}P2..$.t.V.|
000000a0 0e bb 07 00 cd 10 5e eb f0 c3 bb 00 00 b9 04 00 |......^.........|
000000b0 b8 01 02 cd 13 1e 72 34 8c c8 8e d8 bf 00 00 b9 |......r4........|
000000c0 0b 00 26 80 0d 20 26 80 8d 20 00 20 47 e2 f3 bf |..&.. &.. . G...|
000000d0 00 00 be 76 7d b9 0b 00 fc f3 a6 75 0f bf 20 00 |...v}......u.. .|
000000e0 be 82 7d b9 0b 00 f3 a6 75 02 1f c3 be f9 7c e8 |..}.....u.....|.|
000000f0 a5 ff b4 00 cd 16 1f f9 c3 0d 0a 4e 6f 6e 2d 53 |...........Non-S|
00000100 79 73 74 65 6d 20 64 69 73 6b 20 6f 72 20 64 69 |ystem disk or di|
00000110 73 6b 20 65 72 72 6f f2 0d 0a 52 65 70 6c 61 63 |sk erro...Replac|
00000120 65 20 61 6e 64 20 73 74 72 69 6b 65 20 61 6e 79 |e and strike any|
00000130 20 6b 65 79 20 77 68 65 6e 20 72 65 61 64 f9 0d | key when read..|
00000140 0a 00 cd 18 0d 0a 44 69 73 6b 20 42 6f 6f 74 20 |......Disk Boot |
00000150 66 61 69 6c 75 72 e5 0d 0a 00 50 52 8b c6 bf 00 |failur....PR....|
00000160 02 f7 e7 03 d8 5a 58 c3 52 6f 62 65 72 74 20 4f |.....ZX.Robert O|
00000170 27 52 65 61 72 20 69 62 6d 62 69 6f 20 20 63 6f |'Rear ibmbio co|
00000180 6d b0 69 62 6d 64 6f 73 20 20 63 6f 6d b0 c9 00 |m.ibmdos com...|
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
A number of people have already delved into the guts of the PC-DOS 1.00 boot sector, including:
* [Reverse-Engineering DOS 1.0 – Part 1: The Boot Sector (May 7, 2009 by Michael Steil)](http://www.pagetable.com/?p=165)
@ -265,46 +300,43 @@ Using the PCjs Debugger, we can examine the boot sector in its native environmen
&0000:7C00 EB2F JMP 7C31
>> db 7c00 l200
&7C00 EB 2F 14 00 00 00 60 00-20 37 2D 4D 61 79 2D 38 ./....`. 7-May-8
&7C10 31 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 1...............
&7C20 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&7C30 00 FA 8C C8 8E D8 BA 00-00 8E D2 BC 00 7C FB A1 .............|..
&7C40 06 7C 8E D8 8E C0 BA 00-00 8B C2 CD 13 72 41 E8 .|...........rA.
&7C50 58 00 72 FB 2E 8B 0E 02-7C 51 BB 00 00 33 D2 B9 X.r.....|Q...3..
&7C60 08 00 BE 01 00 56 B0 01-B4 02 CD 13 72 22 5E 58 .....V......r"^X
&7C70 E8 E7 00 2B C6 74 14 FE-C5 B1 01 BE 08 00 3B C6 ...+.t........;.
&7C80 73 04 8B F0 EB 01 96 56-50 EB DD 2E FF 2E 04 7C s......VP......|
&7C90 BE 44 7D B8 42 7D 50 32-FF AC 24 7F 74 0B 56 B4 .D}.B}P2..$t.V.
&7CA0 0E BB 07 00 CD 10 5E EB-F0 C3 BB 00 00 B9 04 00 ......^.........
&7CB0 B8 01 02 CD 13 1E 72 34-8C C8 8E D8 BF 00 00 B9 ......r4........
&7CC0 0B 00 26 80 0D 20 26 80-8D 20 00 20 47 E2 F3 BF ..&.. &.. . G...
&7CD0 00 00 BE 76 7D B9 0B 00-FC F3 A6 75 0F BF 20 00 ...v}......u.. .
&7CE0 BE 82 7D B9 0B 00 F3 A6-75 02 1F C3 BE F9 7C E8 ..}.....u.....|.
&7CF0 A5 FF B4 00 CD 16 1F F9-C3 0D 0A 4E 6F 6E 2D 53 ...........Non-S
&7D00 79 73 74 65 6D 20 64 69-73 6B 20 6F 72 20 64 69 ystem disk or di
&7D10 73 6B 20 65 72 72 6F F2-0D 0A 52 65 70 6C 61 63 sk erro...Replac
&7D20 65 20 61 6E 64 20 73 74-72 69 6B 65 20 61 6E 79 e and strike any
&7D30 20 6B 65 79 20 77 68 65-6E 20 72 65 61 64 F9 0D key when read..
&7D40 0A 00 CD 18 0D 0A 44 69-73 6B 20 42 6F 6F 74 20 ......Disk Boot
&7D50 66 61 69 6C 75 72 E5 0D-0A 00 50 52 8B C6 BF 00 failur....PR....
&7D60 02 F7 E7 03 D8 5A 58 C3-52 6F 62 65 72 74 20 4F .....ZX.Robert O
&7D70 27 52 65 61 72 20 69 62-6D 62 69 6F 20 20 63 6F 'Rear ibmbio co
&7D80 6D B0 69 62 6D 64 6F 73-20 20 63 6F 6D B0 C9 00 m.ibmdos com...
&7D90 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&7DA0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&7DB0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&7DC0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&7DD0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&7DE0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&7DF0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7C00 EB 2F 14 00 00 00 60 00-20 37 2D 00 02 01 01 00 ./....`. 7-.....
&0000:7C10 02 40 00 40 01 FE 01 00-08 00 01 00 00 00 00 00 .@.@............
&0000:7C20 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7C30 00 FA 8C C8 8E D8 BA 00-00 8E D2 BC 00 7C FB A1 .............|..
&0000:7C40 06 7C 8E D8 8E C0 BA 00-00 8B C2 CD 13 72 41 E8 .|...........rA.
&0000:7C50 58 00 72 FB 2E 8B 0E 02-7C 51 BB 00 00 33 D2 B9 X.r.....|Q...3..
&0000:7C60 08 00 BE 01 00 56 B0 01-B4 02 CD 13 72 22 5E 58 .....V......r"^X
&0000:7C70 E8 E7 00 2B C6 74 14 FE-C5 B1 01 BE 08 00 3B C6 ...+.t........;.
&0000:7C80 73 04 8B F0 EB 01 96 56-50 EB DD 2E FF 2E 04 7C s......VP......|
&0000:7C90 BE 44 7D B8 42 7D 50 32-FF AC 24 7F 74 0B 56 B4 .D}.B}P2..$t.V.
&0000:7CA0 0E BB 07 00 CD 10 5E EB-F0 C3 BB 00 00 B9 04 00 ......^.........
&0000:7CB0 B8 01 02 CD 13 1E 72 34-8C C8 8E D8 BF 00 00 B9 ......r4........
&0000:7CC0 0B 00 26 80 0D 20 26 80-8D 20 00 20 47 E2 F3 BF ..&.. &.. . G...
&0000:7CD0 00 00 BE 76 7D B9 0B 00-FC F3 A6 75 0F BF 20 00 ...v}......u.. .
&0000:7CE0 BE 82 7D B9 0B 00 F3 A6-75 02 1F C3 BE F9 7C E8 ..}.....u.....|.
&0000:7CF0 A5 FF B4 00 CD 16 1F F9-C3 0D 0A 4E 6F 6E 2D 53 ...........Non-S
&0000:7D00 79 73 74 65 6D 20 64 69-73 6B 20 6F 72 20 64 69 ystem disk or di
&0000:7D10 73 6B 20 65 72 72 6F F2-0D 0A 52 65 70 6C 61 63 sk erro...Replac
&0000:7D20 65 20 61 6E 64 20 73 74-72 69 6B 65 20 61 6E 79 e and strike any
&0000:7D30 20 6B 65 79 20 77 68 65-6E 20 72 65 61 64 F9 0D key when read..
&0000:7D40 0A 00 CD 18 0D 0A 44 69-73 6B 20 42 6F 6F 74 20 ......Disk Boot
&0000:7D50 66 61 69 6C 75 72 E5 0D-0A 00 50 52 8B C6 BF 00 failur....PR....
&0000:7D60 02 F7 E7 03 D8 5A 58 C3-52 6F 62 65 72 74 20 4F .....ZX.Robert O
&0000:7D70 27 52 65 61 72 20 69 62-6D 62 69 6F 20 20 63 6F 'Rear ibmbio co
&0000:7D80 6D B0 69 62 6D 64 6F 73-20 20 63 6F 6D B0 C9 00 m.ibmdos com...
&0000:7D90 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7DA0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7DB0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7DC0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7DD0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7DE0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7DF0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
NOTE: When PCjs adds a BPB to the boot sector, the first 32 bytes will actually look like:
&7C00 EB 2F 14 00 00 00 60 00-20 37 2D 00 02 01 01 00 ./....`. 7-.....
&7C10 02 40 00 40 01 FE 01 00-08 00 01 00 00 00 00 00 .@.@............
The addition of a BPB makes the disk image mountable by modern operating systems and does not
otherwise affect the operation of the boot sector or any of the code below.
NOTE: PCjs adds a BPB to the boot sector, which is why the first 32 bytes of the boot sector
appear slightly different from the original [dump](#pc-dos-100-boot-sector) above. The addition of
a BPB makes the disk image mountable by modern operating systems and does not otherwise affect the
operation of the boot sector or any of the code below.
First, let's disassemble the code from `start` (0x7C31):
@ -439,6 +471,11 @@ And finally, `IBMBIO_COM` (0x7D76) and `IBMDOS_COM` (0x7D82):
&7D78 6D 62 69 6F 20 20 63 6F-6D B0 69 62 6D 64 6F 73 mbio com.ibmdos
&7D88 20 20 63 6F 6D B0 C9 00-00 00 00 00 00 00 00 00 com...........
Interestingly, the [COMPAQ MS-DOS 1.11 Boot Sector](/disks/pcx86/dos/compaq/1.11/#compaq-ms-dos-111-boot-sector)
is completely different from all PC-DOS 1.x boot sectors. The COMPAQ boot sector supports both 160Kb and 320Kb
formats with less code and without requiring "patches", although that flexibility did require reading the first
FAT sector, which PC-DOS 1.x boot sectors did not do.
### Additional Information From [PC DOS Retro](https://sites.google.com/site/pcdosretro/doshist)
- distributed on 1 160KB floppy disk

View file

@ -74,7 +74,7 @@ size of IBMDOS.COM is 6656, so the total number of bytes consumed by those two f
### PC-DOS 1.10 Boot Sector
The boot sector of the PC-DOS 1.11 disk image contains the following bytes:
The boot sector of the PC-DOS 1.10 disk image contains the following bytes:
00000000 eb 27 90 08 00 14 00 00 00 00 00 00 00 00 00 00 |.'..............|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
@ -124,6 +124,11 @@ a 320Kb diskette is allocated a larger root directory (7 sectors instead of 4),
out to sector #3 and head #1. The total number of sectors to read (0x14) remains the same as PC-DOS 1.00, but that
value is now stored at offset 0x0005 (0x7C05) instead of 0x0002 (0x7C02).
Interestingly, the [COMPAQ MS-DOS 1.11 Boot Sector](/disks/pcx86/dos/compaq/1.11/#compaq-ms-dos-111-boot-sector)
is completely different from all PC-DOS 1.x boot sectors. The COMPAQ boot sector supports both 160Kb and 320Kb
formats with less code and without requiring "patches", although that flexibility did require reading the first
FAT sector, which PC-DOS 1.x boot sectors did not do.
Using the PCjs Debugger, we can examine the boot sector in its native environment:
bp &0000:7C00 hit
@ -131,6 +136,46 @@ Using the PCjs Debugger, we can examine the boot sector in its native environmen
AX=0000 BX=7C00 CX=0004 DX=0000 SP=0100 BP=E4B7 SI=0000 DI=0044
SS=0030 DS=0040 ES=0000 PS=F296 V0 D0 I1 T0 S1 Z0 A1 P1 C0
&0000:7C00 EB27 JMP 7C29
>> db 7c00 l200
&0000:7C00 EB 27 90 08 00 14 00 00-00 00 00 00 02 01 01 00 .'..............
&0000:7C10 02 40 00 40 01 FE 01 00-08 00 01 00 00 00 00 00 .@.@............
&0000:7C20 00 00 00 00 00 00 00 CD-19 FA 8C C8 8E D8 33 D2 ..............3.
&0000:7C30 8E D2 BC 00 7C FB B8 60-00 8E D8 8E C0 33 D2 8B ....|..`.....3..
&0000:7C40 C2 CD 13 72 69 E8 85 00-72 DD 2E 83 3E 03 7C 08 ...ri...r...>.|.
&0000:7C50 74 06 2E C6 06 64 7D 02-BB 00 00 2E 8B 0E 03 7C t....d}........|
&0000:7C60 51 B0 09 2A C1 B4 00 8B-F0 56 33 D2 33 C0 8A C5 Q..*.....V3.3...
&0000:7C70 2E F6 36 64 7D 8A E8 8A-F4 8B C6 B4 02 CD 13 72 ..6d}..........r
&0000:7C80 2D 5E 59 2E 29 36 05 7C-74 1F 8B C6 2E F7 26 65 -^Y.)6.|t.....&e
&0000:7C90 7D 03 D8 FE C5 B1 01 51-BE 08 00 2E 3B 36 05 7C }......Q....;6.|
&0000:7CA0 7C 05 2E 8B 36 05 7C EB-C0 EA 00 00 60 00 BE 67 |...6.|.....`..g
&0000:7CB0 7D E8 02 00 EB FE 32 FF-2E AC 24 7F 74 0B 56 B4 }.....2...$t.V.
&0000:7CC0 0E BB 07 00 CD 10 5E EB-EF C3 E9 33 FF BB 00 00 ......^....3....
&0000:7CD0 B9 04 00 B8 01 02 CD 13-1E 72 33 8C C8 8E D8 BF .........r3.....
&0000:7CE0 00 00 B9 0B 00 26 80 0D-20 26 80 4D 20 20 47 E2 .....&.. &.M G.
&0000:7CF0 F4 BF 00 00 BE 8B 7D B9-0B 00 FC F3 A6 75 0F BF ......}......u..
&0000:7D00 20 00 BE 97 7D B9 0B 00-F3 A6 75 02 1F C3 BE 1B ...}.....u.....
&0000:7D10 7D E8 A2 FF B4 00 CD 16-1F F9 C3 0D 0A 4E 6F 6E }............Non
&0000:7D20 2D 53 79 73 74 65 6D 20-64 69 73 6B 20 6F 72 20 -System disk or
&0000:7D30 64 69 73 6B 20 65 72 72-6F 72 0D 0A 52 65 70 6C disk error..Repl
&0000:7D40 61 63 65 20 61 6E 64 20-73 74 72 69 6B 65 20 61 ace and strike a
&0000:7D50 6E 79 20 6B 65 79 20 77-68 65 6E 20 72 65 61 64 ny key when read
&0000:7D60 79 0D 0A 00 01 00 02 0D-0A 44 69 73 6B 20 42 6F y........Disk Bo
&0000:7D70 6F 74 20 66 61 69 6C 75-72 65 0D 0A 00 4D 69 63 ot failure...Mic
&0000:7D80 72 6F 73 6F 66 74 2C 49-6E 63 20 69 62 6D 62 69 rosoft,Inc ibmbi
&0000:7D90 6F 20 20 63 6F 6D 30 69-62 6D 64 6F 73 20 20 63 o com0ibmdos c
&0000:7DA0 6F 6D 30 05 C6 06 77 2F-FF 83 7E FC 00 75 0B 80 om0...w/..~..u..
&0000:7DB0 7E F7 3B 75 05 C6 06 76-2F FF 89 EC 5D CA 04 00 ~.;u...v/...]...
&0000:7DC0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7DD0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7DE0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
&0000:7DF0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
NOTE: PCjs adds a BPB to the boot sector, which is why the first 32 bytes of the boot sector
appear slightly different from the original [dump](#pc-dos-110-boot-sector) above. The addition of
a BPB makes the disk image mountable by modern operating systems and does not otherwise affect the
operation of the boot sector or any of the code below.
>> tr
AX=0000 BX=7C00 CX=0004 DX=0000 SP=0100 BP=E4B7 SI=0000 DI=0044
SS=0030 DS=0040 ES=0000 PS=F296 V0 D0 I1 T0 S1 Z0 A1 P1 C0