Merge branch 'master' into gh-pages
This commit is contained in:
commit
942200d6e0
13 changed files with 1042 additions and 733 deletions
|
|
@ -117,8 +117,8 @@ The boot sector of the COMPAQ MS-DOS 1.11 disk image contains the following byte
|
|||
000001e0 00 00 00 00 00 00 00 e7 01 00 00 00 00 00 00 00 |................|
|
||||
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
|
||||
|
||||
Unlike most DOS boot sectors, this boot sector doesn't start with an Intel x86 JMP instruction. Let's take a
|
||||
look at the code, using the PCjs Debugger to stop at the first instruction:
|
||||
Unlike most DOS boot sectors, this boot sector doesn't start with an Intel x86 JMP instruction.
|
||||
Let's take a look at the code, using the PCjs Debugger to stop at the first instruction:
|
||||
|
||||
>> bp 0:7c00
|
||||
bp &0000:7C00 set
|
||||
|
|
@ -134,44 +134,38 @@ look at the code, using the PCjs Debugger to stop at the first instruction:
|
|||
&0000:7C04 B8C007 MOV AX,07C0
|
||||
&0000:7C07 8ED0 MOV SS,AX
|
||||
&0000:7C09 FB STI
|
||||
;
|
||||
; At this point, the stack has been set to an unused region INSIDE the boot sector, because
|
||||
; 07C0:01E7 is the same as 0000:7C00+01E7 or 0000:7DE7. This puts a fairly low limit on stack
|
||||
; usage: as more stack is used, the COMPAQ copyright string will be trashed first, then boot
|
||||
; sector data, then boot sector code.
|
||||
;
|
||||
; Curiously, the value 01E7 is also stored at 07C0:01E7. Also curious is the choice of an ODD
|
||||
; address for the stack (although, for the 8088, this presumably didn't affect performance).
|
||||
;
|
||||
|
||||
At this point, the stack has been set to an unused region INSIDE the boot sector, because
|
||||
07C0:01E7 is the same as 0000:7C00+01E7 or 0000:7DE7. This puts a fairly low limit on stack
|
||||
usage: as more stack is used, the COMPAQ copyright string will be trashed first, then boot
|
||||
sector data, then boot sector code.
|
||||
|
||||
Curiously, the value 01E7 is also stored at 07C0:01E7. Also curious is the choice of an ODD
|
||||
address for the stack (although, for the 8088, this presumably didn't affect performance).
|
||||
|
||||
After the next two instructions, all of DS:0, ES:0, and SS:0 point to the beginning of the
|
||||
boot sector (just like CS:7C00):
|
||||
|
||||
&0000:7C0A 8ED8 MOV DS,AX
|
||||
&0000:7C0C 8EC0 MOV ES,AX
|
||||
;
|
||||
; All of DS:0, ES:0, and SS:0 now point to the beginning of the boot sector, as does CS:7C00.
|
||||
;
|
||||
&0000:7C0E 33C0 XOR AX,AX ; perform a disk reset
|
||||
|
||||
This resets the drive:
|
||||
|
||||
&0000:7C0E 33C0 XOR AX,AX ; perform a drive reset
|
||||
&0000:7C10 CD13 INT 13
|
||||
;
|
||||
; Read 1 sector (the 4th sector, which is the first sector of the directory) into memory immediately
|
||||
; above the boot sector (07C0:0200).
|
||||
;
|
||||
|
||||
Next, read 1 sector (the 4th sector, which is the first sector of the directory) into memory
|
||||
immediately above the boot sector (07C0:0200):
|
||||
|
||||
&0000:7C12 B80102 MOV AX,0201
|
||||
&0000:7C15 BB0002 MOV BX,0200
|
||||
&0000:7C18 B90400 MOV CX,0004
|
||||
&0000:7C1B 33D2 XOR DX,DX
|
||||
&0000:7C1D E88B00 CALL 7CAB ; call DISK_IO
|
||||
&0000:7C1D E88B00 CALL 7CAB ; read the disk
|
||||
&0000:7C20 EB1C JMP 7C3E
|
||||
;
|
||||
; ERROR: print error message and start over.
|
||||
;
|
||||
; Setting DS:BX to 07C0:00DA references the same memory as CS:7CDA:
|
||||
;
|
||||
; >> db cs:7cda cs:7d22
|
||||
; &0000:7CDA 0A 0D 4E 6F 6E 2D 53 79-73 74 65 6D 20 64 69 73 ..Non-System dis
|
||||
; &0000:7CEA 6B 20 6F 72 20 64 69 73-6B 20 65 72 72 6F 72 0A k or disk error.
|
||||
; &0000:7CFA 0D 52 65 70 6C 61 63 65-20 61 6E 64 20 73 74 72 .Replace and str
|
||||
; &0000:7D0A 69 6B 65 20 61 6E 79 20-6B 65 79 20 77 68 65 6E ike any key when
|
||||
; &0000:7D1A 20 72 65 61 64 79 0A 0D-24 ready..$
|
||||
;
|
||||
|
||||
Next, the error handler and restart sequence:
|
||||
|
||||
&0000:7C22 BBDA00 MOV BX,00DA
|
||||
&0000:7C25 8A07 MOV AL,[BX]
|
||||
&0000:7C27 3C24 CMP AL,24
|
||||
|
|
@ -188,51 +182,62 @@ look at the code, using the PCjs Debugger to stop at the first instruction:
|
|||
&0000:7C3B EBC3 JMP 7C00 ; start over
|
||||
&0000:7C3D C3 RET ; unreachable RET?
|
||||
|
||||
Here's the error message (setting DS:BX to 07C0:00DA references the same memory as CS:7CDA):
|
||||
|
||||
>> db cs:7cda cs:7d22
|
||||
&0000:7CDA 0A 0D 4E 6F 6E 2D 53 79-73 74 65 6D 20 64 69 73 ..Non-System dis
|
||||
&0000:7CEA 6B 20 6F 72 20 64 69 73-6B 20 65 72 72 6F 72 0A k or disk error.
|
||||
&0000:7CFA 0D 52 65 70 6C 61 63 65-20 61 6E 64 20 73 74 72 .Replace and str
|
||||
&0000:7D0A 69 6B 65 20 61 6E 79 20-6B 65 79 20 77 68 65 6E ike any key when
|
||||
&0000:7D1A 20 72 65 61 64 79 0A 0D-24 ready..$
|
||||
|
||||
Next, we have the code to validate the directory contents:
|
||||
|
||||
&0000:7C3E FC CLD
|
||||
&0000:7C3F 8BF3 MOV SI,BX
|
||||
&0000:7C41 BFC400 MOV DI,00C4 ; ES:DI -> 7C0:C4 (aka 0:7CC4)
|
||||
&0000:7C44 B90B00 MOV CX,000B
|
||||
&0000:7C47 F3 REPZ
|
||||
&0000:7C48 A6 CMPSB
|
||||
&0000:7C49 75D7 JNZ 7C22 ; if first DIRENTRY was not "IOSYS.COM", jump to ERROR
|
||||
&0000:7C49 75D7 JNZ 7C22 ; if first DIRENTRY was not "IOSYS.COM", jump to error handler
|
||||
&0000:7C4B 83C615 ADD SI,0015
|
||||
&0000:7C4E B90B00 MOV CX,000B
|
||||
&0000:7C51 F3 REPZ
|
||||
&0000:7C52 A6 CMPSB
|
||||
&0000:7C53 75CD JNZ 7C22 ; if second DIRENTRY was not "IOSYS.COM", jump to ERROR
|
||||
&0000:7C53 75CD JNZ 7C22 ; if second DIRENTRY was not "IOSYS.COM", jump to error handler
|
||||
&0000:7C55 B80102 MOV AX,0201
|
||||
&0000:7C58 BB0002 MOV BX,0200
|
||||
&0000:7C5B B90200 MOV CX,0002
|
||||
&0000:7C5E 33D2 XOR DX,DX
|
||||
&0000:7C60 E84800 CALL 7CAB ; call DISK_IO to read 1st FAT sector
|
||||
;
|
||||
; At this point, the directory sector is gone, and all this code did with it was verify the names of
|
||||
; the first two entries. It did not examine or record their starting cluster numbers. And in the FAT
|
||||
; sector just read, only one byte (the first byte) will be examined next: the media ID byte.
|
||||
;
|
||||
; Further reading will rely on on two hard-coded tables inside the boot sector: one table at DS:126 (CS:7D26)
|
||||
; if the FAT media ID byte is 0xFE (160Kb diskette), or another table at DS:13C (CS:7D3C) if the FAT media ID
|
||||
; byte is 0xFF (320Kb diskette). If the FAT media ID byte is neither, off to ERROR we go.
|
||||
;
|
||||
; Here's the table for the 160Kb diskette:
|
||||
;
|
||||
; >> dw cs:7d26 l11.
|
||||
; &0000:7D26 0201 0008 0000 0208 0200 0101 0000 0208 ................
|
||||
; &0000:7D36 1000 0201 0000 ......
|
||||
;
|
||||
; and here's the table for the 320Kb diskette:
|
||||
;
|
||||
; >> dw cs:7d3c l11.
|
||||
; &0000:7D3C 0206 0003 0100 0208 0C00 0101 0000 0203 ................
|
||||
; &0000:7D4C 1000 0101 0100 ......
|
||||
;
|
||||
; These tables are then followed by a DWORD jump address:
|
||||
;
|
||||
; >> dw cs:7d52 l2
|
||||
; &0000:7D52 0000 0060 ..`.
|
||||
;
|
||||
; which means that the "JMP FAR [0152]" instruction will jump to 60:0 after the reads are complete.
|
||||
;
|
||||
&0000:7C60 E84800 CALL 7CAB ; read 1st FAT sector
|
||||
|
||||
At this point, the directory sector is gone, and all this code did with it was verify the names of
|
||||
the first two entries. It did not examine or record their starting cluster numbers. And in the FAT
|
||||
sector just read, only one byte (the first byte) will be examined next: the media ID byte.
|
||||
|
||||
Further reading will rely on on two hard-coded tables inside the boot sector: one table at DS:126 (CS:7D26)
|
||||
if the FAT media ID byte is 0xFE (160Kb diskette), or another table at DS:13C (CS:7D3C) if the FAT media ID
|
||||
byte is 0xFF (320Kb diskette). If the FAT media ID byte is neither, off to the error handler we go.
|
||||
|
||||
Here's the table for the 160Kb diskette:
|
||||
|
||||
>> dw cs:7d26 l11.
|
||||
&0000:7D26 0201 0008 0000 0208 0200 0101 0000 0208 ................
|
||||
&0000:7D36 1000 0201 0000 ......
|
||||
|
||||
and here's the table for the 320Kb diskette:
|
||||
|
||||
>> dw cs:7d3c l11.
|
||||
&0000:7D3C 0206 0003 0100 0208 0C00 0101 0000 0203 ................
|
||||
&0000:7D4C 1000 0101 0100 ......
|
||||
|
||||
These tables are then followed by a DWORD jump address:
|
||||
|
||||
>> dw cs:7d52 l2
|
||||
&0000:7D52 0000 0060 ..`.
|
||||
|
||||
which means that the "JMP FAR [0152]" instruction will jump to 60:0 after the reads are complete.
|
||||
|
||||
&0000:7C63 8A27 MOV AH,[BX]
|
||||
&0000:7C65 80FCFE CMP AH,FE
|
||||
&0000:7C68 BE2601 MOV SI,0126
|
||||
|
|
@ -260,9 +265,10 @@ look at the code, using the PCjs Debugger to stop at the first instruction:
|
|||
&0000:7CA1 8B5414 MOV DX,[SI+14]
|
||||
&0000:7CA4 E80400 CALL 7CAB
|
||||
&0000:7CA7 FF2E5201 JMP FAR [0152]
|
||||
;
|
||||
; DISK_IO: read AL sector(s) identified by the CHS values in CX:DX into ES:BX, using DI as a retry counter.
|
||||
;
|
||||
|
||||
The final chunk of code is the disk read interface, which reads AL sector(s) identified by the CHS values in CX:DX
|
||||
into ES:BX, using DI as a retry counter:
|
||||
|
||||
&0000:7CAB BF0500 MOV DI,0005
|
||||
&0000:7CAE 57 PUSH DI
|
||||
&0000:7CAF 50 PUSH AX
|
||||
|
|
@ -280,6 +286,8 @@ look at the code, using the PCjs Debugger to stop at the first instruction:
|
|||
&0000:7CC0 58 POP AX ; retry count exhausted
|
||||
&0000:7CC1 E95EFF JMP 7C22 ; jump to PRINT function
|
||||
|
||||
And then we have the assorted strings and tables:
|
||||
|
||||
>> db 7cc4 l13c
|
||||
&7CC4 49 4F 53 59 53 20 20 20-43 4F 4D 4D 53 44 4F 53 IOSYS COMMSDOS
|
||||
&7CD4 20 20 20 43 4F 4D 0A 0D-4E 6F 6E 2D 53 79 73 74 COM..Non-Syst
|
||||
|
|
@ -302,9 +310,19 @@ look at the code, using the PCjs Debugger to stop at the first instruction:
|
|||
&7DE4 00 00 00 E7 01 00 00 00-00 00 00 00 00 00 00 00 ................
|
||||
&7DF4 00 00 00 00 00 00 00 00-00 00 00 00
|
||||
|
||||
In terms of raw code (90 instructions), it's shorter than the PC-DOS 1.00 boot sector (99 instructions),
|
||||
even though it supports twice as many disk formats. This is because it uses tables to describe both the
|
||||
different disk formats *and* the discrete read operations, relieving the code from dealing with track boundaries.
|
||||
In terms of raw code (90 instructions), it's shorter than both the
|
||||
[PC-DOS 1.00 Boot Sector](/disks/pcx86/dos/ibm/1.00/#pc-dos-100-boot-sector) (99 instructions) and
|
||||
[PC-DOS 1.10 Boot Sector](/disks/pcx86/dos/ibm/1.10/#pc-dos-110-boot-sector) (116 instructions),
|
||||
because it uses tables to describe both the different disk formats *and* the discrete read operations,
|
||||
relieving the code from dealing with head and track size calculations.
|
||||
|
||||
It's arguably an improvement over the [PC-DOS 1.10 Boot Sector](/disks/pcx86/dos/ibm/1.10/#pc-dos-110-boot-sector),
|
||||
because it didn't need to be altered to support both 160Kb and 320Kb diskettes. On the other hand, that flexibility
|
||||
also makes it slightly slower to boot, because it must read the first FAT sector to determine the diskette format.
|
||||
|
||||
Finally, notice the letters `GAS` in the boot sector at offset 0x7D23. Presumably, they're the initials of
|
||||
author, and somewhat less conspicuous and more modest than the `Robert O'Rear` signature in the
|
||||
[PC-DOS 1.00 Boot Sector](/disks/pcx86/dos/ibm/1.00/#pc-dos-100-boot-sector).
|
||||
|
||||
### Mounting the COMPAQ MS-DOS 1.11 Diskette
|
||||
|
||||
|
|
|
|||
|
|
@ -19,13 +19,12 @@ PC-DOS 1.00
|
|||
-----------
|
||||
|
||||
PC-DOS 1.00 was completed in August 1981 and announced at an IBM press conference on August 12, 1981,
|
||||
when IBM introduced the original IBM PC (Model 5150).
|
||||
when IBM introduced the original IBM PC (Model 5150). It was released on one single-sided (160Kb) diskette.
|
||||
The disk's [Directory Listing](#directory-of-pc-dos-100-diskette) and [Boot Sector](#pc-dos-100-boot-sector)
|
||||
are shown below.
|
||||
|
||||
To learn how to use PC-DOS 1.00, see the [Documentation](/pubs/pc/software/dos/PCDOS100/).
|
||||
|
||||
To learn more about this single-sided (160Kb) diskette, see the
|
||||
[Directory Listing](#directory-of-pc-dos-100-diskette) and [Boot Sector](#pc-dos-100-boot-sector) below.
|
||||
|
||||
{% include machine.html id="ibm5150-pcdos100" %}
|
||||
|
||||
### Directory of PC-DOS 1.00 Diskette
|
||||
|
|
@ -79,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)
|
||||
|
|
@ -257,7 +291,7 @@ because it includes lots of commentary, allowing the boot sector to more or less
|
|||
|
||||
;-----------------------------------------------------------------------------
|
||||
|
||||
Using the PCjs Debugger, we can view the code above in its native environment:
|
||||
Using the PCjs Debugger, we can examine the boot sector in its native environment:
|
||||
|
||||
bp &0000:7C00 hit
|
||||
stopped
|
||||
|
|
@ -266,46 +300,43 @@ Using the PCjs Debugger, we can view the code above in its native environment:
|
|||
&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):
|
||||
|
||||
|
|
@ -440,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
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ permalink: /disks/pcx86/dos/ibm/1.10/
|
|||
machines:
|
||||
- id: ibm5150-pcdos110
|
||||
type: pcx86
|
||||
config: /devices/pcx86/machine/5150/mda/64kb/machine.xml
|
||||
config: /devices/pcx86/machine/5150/mda/64kb/debugger/machine.xml
|
||||
resume: 1
|
||||
autoMount:
|
||||
A:
|
||||
|
|
@ -18,20 +18,14 @@ machines:
|
|||
PC-DOS 1.10
|
||||
-----------
|
||||
|
||||
The PCjs machine below is running PC-DOS 1.10.
|
||||
PC-DOS 1.10 was released in May 1982 on one single-sided (160Kb) diskette.
|
||||
The disk's [Directory Listing](#directory-of-pc-dos-110-diskette) and [Boot Sector](#pc-dos-110-boot-sector)
|
||||
are shown below.
|
||||
|
||||
To learn how to use PC-DOS 1.10, see the [Documentation](/pubs/pc/software/dos/PCDOS110/).
|
||||
|
||||
{% include machine.html id="ibm5150-pcdos110" %}
|
||||
|
||||
PC-DOS 1.10 was released in May 1982 on one single-sided (160Kb) diskette. A complete listing of all the files
|
||||
is provided below.
|
||||
|
||||
Also, in case you're wondering why 1920 + 6400 does not equal the "8704 bytes in 2 hidden files" reported by CHKDSK,
|
||||
that's because all CHKDSK byte totals are cluster-granular. On a 160Kb diskette, 1 cluster equals 1 sector or 512
|
||||
bytes.
|
||||
|
||||
CHKDSK considers the size of IBMBIO.COM to be 2048 bytes (1920 rounded up to the nearest 512 multiple), and the
|
||||
size of IBMDOS.COM is 6656, so the total number of bytes consumed by those two files is 8704.
|
||||
|
||||
### Directory of PC-DOS 1.10 Diskette
|
||||
|
||||
IBMBIO COM 1920 05-07-82
|
||||
|
|
@ -71,8 +65,245 @@ CHKDSK reports:
|
|||
144384 bytes in 26 user files
|
||||
7168 bytes available on disk
|
||||
|
||||
Additional Information From [PC DOS Retro](https://sites.google.com/site/pcdosretro/doshist)
|
||||
---
|
||||
In case you're wondering why 1920 + 6400 does not equal the "8704 bytes in 2 hidden files" reported by CHKDSK,
|
||||
that's because all CHKDSK byte totals are cluster-granular. On a 160Kb diskette, 1 cluster equals 1 sector or 512
|
||||
bytes.
|
||||
|
||||
CHKDSK considers the size of IBMBIO.COM to be 2048 bytes (1920 rounded up to the nearest 512 multiple), and the
|
||||
size of IBMDOS.COM is 6656, so the total number of bytes consumed by those two files is 8704.
|
||||
|
||||
### PC-DOS 1.10 Boot Sector
|
||||
|
||||
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 |................|
|
||||
00000020 00 00 00 00 00 00 00 cd 19 fa 8c c8 8e d8 33 d2 |..............3.|
|
||||
00000030 8e d2 bc 00 7c fb b8 60 00 8e d8 8e c0 33 d2 8b |....|..`.....3..|
|
||||
00000040 c2 cd 13 72 69 e8 85 00 72 dd 2e 83 3e 03 7c 08 |...ri...r...>.|.|
|
||||
00000050 74 06 2e c6 06 64 7d 02 bb 00 00 2e 8b 0e 03 7c |t....d}........||
|
||||
00000060 51 b0 09 2a c1 b4 00 8b f0 56 33 d2 33 c0 8a c5 |Q..*.....V3.3...|
|
||||
00000070 2e f6 36 64 7d 8a e8 8a f4 8b c6 b4 02 cd 13 72 |..6d}..........r|
|
||||
00000080 2d 5e 59 2e 29 36 05 7c 74 1f 8b c6 2e f7 26 65 |-^Y.)6.|t.....&e|
|
||||
00000090 7d 03 d8 fe c5 b1 01 51 be 08 00 2e 3b 36 05 7c |}......Q....;6.||
|
||||
000000a0 7c 05 2e 8b 36 05 7c eb c0 ea 00 00 60 00 be 67 ||...6.|.....`..g|
|
||||
000000b0 7d e8 02 00 eb fe 32 ff 2e ac 24 7f 74 0b 56 b4 |}.....2...$.t.V.|
|
||||
000000c0 0e bb 07 00 cd 10 5e eb ef c3 e9 33 ff bb 00 00 |......^....3....|
|
||||
000000d0 b9 04 00 b8 01 02 cd 13 1e 72 33 8c c8 8e d8 bf |.........r3.....|
|
||||
000000e0 00 00 b9 0b 00 26 80 0d 20 26 80 4d 20 20 47 e2 |.....&.. &.M G.|
|
||||
000000f0 f4 bf 00 00 be 8b 7d b9 0b 00 fc f3 a6 75 0f bf |......}......u..|
|
||||
00000100 20 00 be 97 7d b9 0b 00 f3 a6 75 02 1f c3 be 1b | ...}.....u.....|
|
||||
00000110 7d e8 a2 ff b4 00 cd 16 1f f9 c3 0d 0a 4e 6f 6e |}............Non|
|
||||
00000120 2d 53 79 73 74 65 6d 20 64 69 73 6b 20 6f 72 20 |-System disk or |
|
||||
00000130 64 69 73 6b 20 65 72 72 6f 72 0d 0a 52 65 70 6c |disk error..Repl|
|
||||
00000140 61 63 65 20 61 6e 64 20 73 74 72 69 6b 65 20 61 |ace and strike a|
|
||||
00000150 6e 79 20 6b 65 79 20 77 68 65 6e 20 72 65 61 64 |ny key when read|
|
||||
00000160 79 0d 0a 00 01 00 02 0d 0a 44 69 73 6b 20 42 6f |y........Disk Bo|
|
||||
00000170 6f 74 20 66 61 69 6c 75 72 65 0d 0a 00 4d 69 63 |ot failure...Mic|
|
||||
00000180 72 6f 73 6f 66 74 2c 49 6e 63 20 69 62 6d 62 69 |rosoft,Inc ibmbi|
|
||||
00000190 6f 20 20 63 6f 6d 30 69 62 6d 64 6f 73 20 20 63 |o com0ibmdos c|
|
||||
000001a0 6f 6d 30 05 c6 06 77 2f ff 83 7e fc 00 75 0b 80 |om0...w/..~..u..|
|
||||
000001b0 7e f7 3b 75 05 c6 06 76 2f ff 89 ec 5d ca 04 00 |~.;u...v/...]...|
|
||||
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 |................|
|
||||
|
||||
This is also the boot sector as it appears on any other single-sided 160Kb diskette formatted by PC-DOS 1.10.
|
||||
However, PC-DOS 1.10 added supported for a second format: double-sided 320Kb diskettes. And on those larger diskettes,
|
||||
the boot sector is slightly different:
|
||||
|
||||
1c1
|
||||
< 00000000 eb 27 90 08 00 14 00 00 00 00 00 00 00 00 00 00 |.'..............|
|
||||
---
|
||||
> 00000000 eb 27 90 03 01 14 00 00 00 00 00 00 00 00 00 00 |.'..............|
|
||||
|
||||
The bytes at offset 0x0003 (0x7C03 when the boot sector is loaded into memory) contain the initial sector
|
||||
and head numbers of IBMBIO.COM. On a 160Kb diskette, the first data sector is at sector #8 and head #0, but since
|
||||
a 320Kb diskette is allocated a larger root directory (7 sectors instead of 4), that pushes the first data sector
|
||||
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
|
||||
stopped
|
||||
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
|
||||
&0000:7C29 FA CLI ;cycles=15
|
||||
>> u 7c2a 7d1a
|
||||
&0000:7C2A 8CC8 MOV AX,CS
|
||||
&0000:7C2C 8ED8 MOV DS,AX
|
||||
&0000:7C2E 33D2 XOR DX,DX
|
||||
&0000:7C30 8ED2 MOV SS,DX
|
||||
&0000:7C32 BC007C MOV SP,7C00
|
||||
&0000:7C35 FB STI
|
||||
&0000:7C36 B86000 MOV AX,0060
|
||||
&0000:7C39 8ED8 MOV DS,AX
|
||||
&0000:7C3B 8EC0 MOV ES,AX
|
||||
&0000:7C3D 33D2 XOR DX,DX
|
||||
&0000:7C3F 8BC2 MOV AX,DX
|
||||
&0000:7C41 CD13 INT 13
|
||||
&0000:7C43 7269 JC 7CAE
|
||||
&0000:7C45 E88500 CALL 7CCD
|
||||
&0000:7C48 72DD JC 7C27
|
||||
&0000:7C4A 2E CS:
|
||||
&0000:7C4B 833E037C08 CMP [7C03],0008
|
||||
&0000:7C50 7406 JZ 7C58
|
||||
&0000:7C52 2E CS:
|
||||
&0000:7C53 C606647D02 MOV [7D64],02
|
||||
&0000:7C58 BB0000 MOV BX,0000
|
||||
&0000:7C5B 2E CS:
|
||||
&0000:7C5C 8B0E037C MOV CX,[7C03]
|
||||
&0000:7C60 51 PUSH CX
|
||||
&0000:7C61 B009 MOV AL,09
|
||||
&0000:7C63 2AC1 SUB AL,CL
|
||||
&0000:7C65 B400 MOV AH,00
|
||||
&0000:7C67 8BF0 MOV SI,AX
|
||||
&0000:7C69 56 PUSH SI
|
||||
&0000:7C6A 33D2 XOR DX,DX
|
||||
&0000:7C6C 33C0 XOR AX,AX
|
||||
&0000:7C6E 8AC5 MOV AL,CH
|
||||
&0000:7C70 2E CS:
|
||||
&0000:7C71 F636647D DIV BYTE [7D64]
|
||||
&0000:7C75 8AE8 MOV CH,AL
|
||||
&0000:7C77 8AF4 MOV DH,AH
|
||||
&0000:7C79 8BC6 MOV AX,SI
|
||||
&0000:7C7B B402 MOV AH,02
|
||||
&0000:7C7D CD13 INT 13
|
||||
&0000:7C7F 722D JC 7CAE
|
||||
&0000:7C81 5E POP SI
|
||||
&0000:7C82 59 POP CX
|
||||
&0000:7C83 2E CS:
|
||||
&0000:7C84 2936057C SUB [7C05],SI
|
||||
&0000:7C88 741F JZ 7CA9
|
||||
&0000:7C8A 8BC6 MOV AX,SI
|
||||
&0000:7C8C 2E CS:
|
||||
&0000:7C8D F726657D MUL WORD [7D65]
|
||||
&0000:7C91 03D8 ADD BX,AX
|
||||
&0000:7C93 FEC5 INC CH
|
||||
&0000:7C95 B101 MOV CL,01
|
||||
&0000:7C97 51 PUSH CX
|
||||
&0000:7C98 BE0800 MOV SI,0008
|
||||
&0000:7C9B 2E CS:
|
||||
&0000:7C9C 3B36057C CMP SI,[7C05]
|
||||
&0000:7CA0 7C05 JL 7CA7
|
||||
&0000:7CA2 2E CS:
|
||||
&0000:7CA3 8B36057C MOV SI,[7C05]
|
||||
&0000:7CA7 EBC0 JMP 7C69
|
||||
&0000:7CA9 EA00006000 JMP &0060:0000
|
||||
&0000:7CAE BE677D MOV SI,7D67
|
||||
&0000:7CB1 E80200 CALL 7CB6
|
||||
&0000:7CB4 EBFE JMP 7CB4
|
||||
|
||||
The next chunk of code is similar to `disk_error` in the [PC-DOS 1.00 Boot Sector](/disks/pcx86/dos/ibm/1.00/#pc-dos-100-boot-sector):
|
||||
|
||||
&0000:7CB6 32FF XOR BH,BH
|
||||
&0000:7CB8 2E CS:
|
||||
&0000:7CB9 AC LODSB
|
||||
&0000:7CBA 247F AND AL,7F
|
||||
&0000:7CBC 740B JZ 7CC9
|
||||
&0000:7CBE 56 PUSH SI
|
||||
&0000:7CBF B40E MOV AH,0E
|
||||
&0000:7CC1 BB0700 MOV BX,0007
|
||||
&0000:7CC4 CD10 INT 10
|
||||
&0000:7CC6 5E POP SI
|
||||
&0000:7CC7 EBEF JMP 7CB8
|
||||
&0000:7CC9 C3 RET
|
||||
&0000:7CCA E933FF JMP 7C00
|
||||
|
||||
The next chunk of code is identical to `check_sys_files` in the [PC-DOS 1.00 Boot Sector](/disks/pcx86/dos/ibm/1.00/#pc-dos-100-boot-sector):
|
||||
|
||||
&0000:7CCD BB0000 MOV BX,0000
|
||||
&0000:7CD0 B90400 MOV CX,0004
|
||||
&0000:7CD3 B80102 MOV AX,0201
|
||||
&0000:7CD6 CD13 INT 13
|
||||
&0000:7CD8 1E PUSH DS
|
||||
&0000:7CD9 7233 JC 7D0E
|
||||
&0000:7CDB 8CC8 MOV AX,CS
|
||||
&0000:7CDD 8ED8 MOV DS,AX
|
||||
&0000:7CDF BF0000 MOV DI,0000
|
||||
&0000:7CE2 B90B00 MOV CX,000B
|
||||
&0000:7CE5 26 ES:
|
||||
&0000:7CE6 800D20 OR [DI],20
|
||||
&0000:7CE9 26 ES:
|
||||
&0000:7CEA 804D2020 OR [DI+20],20
|
||||
&0000:7CEE 47 INC DI
|
||||
&0000:7CEF E2F4 LOOP 7CE5
|
||||
&0000:7CF1 BF0000 MOV DI,0000
|
||||
&0000:7CF4 BE8B7D MOV SI,7D8B
|
||||
&0000:7CF7 B90B00 MOV CX,000B
|
||||
&0000:7CFA FC CLD
|
||||
&0000:7CFB F3 REPZ
|
||||
&0000:7CFC A6 CMPSB
|
||||
&0000:7CFD 750F JNZ 7D0E
|
||||
&0000:7CFF BF2000 MOV DI,0020
|
||||
&0000:7D02 BE977D MOV SI,7D97
|
||||
&0000:7D05 B90B00 MOV CX,000B
|
||||
&0000:7D08 F3 REPZ
|
||||
&0000:7D09 A6 CMPSB
|
||||
&0000:7D0A 7502 JNZ 7D0E
|
||||
&0000:7D0C 1F POP DS
|
||||
&0000:7D0D C3 RET
|
||||
|
||||
&0000:7D0E BE1B7D MOV SI,7D1B
|
||||
&0000:7D11 E8A2FF CALL 7CB6
|
||||
&0000:7D14 B400 MOV AH,00
|
||||
&0000:7D16 CD16 INT 16
|
||||
&0000:7D18 1F POP DS
|
||||
&0000:7D19 F9 STC
|
||||
&0000:7D1A C3 RET
|
||||
|
||||
### Additional Information From [PC DOS Retro](https://sites.google.com/site/pcdosretro/doshist)
|
||||
|
||||
- distributed on 1 160KB floppy disk
|
||||
- double-sided 320KB floppy disk support added
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -6289,16 +6289,15 @@ class DebuggerX86 extends Debugger {
|
|||
var dbgAddrEnd = this.parseAddr(sAddrEnd, true);
|
||||
if (!dbgAddrEnd || dbgAddrEnd.off < dbgAddr.off) return;
|
||||
|
||||
cb = dbgAddrEnd.off - dbgAddr.off;
|
||||
if (!DEBUG && cb > 0x100) {
|
||||
/*
|
||||
* Limiting the amount of disassembled code to 256 bytes in non-DEBUG builds is partly to
|
||||
* prevent the user from wedging the browser by dumping too many lines, but also a recognition
|
||||
* that, in non-DEBUG builds, this.println() keeps print output buffer truncated to 8Kb anyway.
|
||||
* We now +1 the count to make the ending address inclusive (just like the dump command).
|
||||
*/
|
||||
this.println("range too large");
|
||||
return;
|
||||
}
|
||||
cb = dbgAddrEnd.off - dbgAddr.off + 1;
|
||||
if (cb < 0) cb = 1;
|
||||
/*
|
||||
* Limiting the amount of disassembled code to 4K helps prevent the user from wedging the browser.
|
||||
*/
|
||||
if (cb > 0x1000) cb = 0x1000;
|
||||
n = -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1817,6 +1817,12 @@ class Disk extends Component {
|
|||
for (i = 0; i < track.length; i++) {
|
||||
track[i] = this.initSector(null, iCylinder, iHead, i + 1, drive.nBytes, 0);
|
||||
}
|
||||
/*
|
||||
* TODO: This is more dodginess, because we can't be certain that every cylinder on the disk
|
||||
* will receive the same "expanded" treatment, but functions like getSector() rely on instance
|
||||
* properties (eg, this.nHeads), on the assumption that the disk's geometry is homogeneous.
|
||||
*/
|
||||
if (this.nHeads <= iHead) this.nHeads = iHead + 1;
|
||||
}
|
||||
if (track) {
|
||||
for (i = 0; i < track.length; i++) {
|
||||
|
|
@ -1859,6 +1865,12 @@ class Disk extends Component {
|
|||
*/
|
||||
if (!sector && drive.bFormatting && drive.bSector == 9) {
|
||||
sector = track[i] = this.initSector(null, iCylinder, iHead, drive.bSector, drive.nBytes, 0);
|
||||
/*
|
||||
* TODO: This is more dodginess, because we can't be certain that every track on the disk
|
||||
* will receive the same "expanded" treatment, but functions like getSector() rely on instance
|
||||
* properties (eg, this.nSectors), on the assumption that the disk's geometry is homogeneous.
|
||||
*/
|
||||
if (this.nSectors < drive.bSector) this.nSectors = drive.bSector;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1148,6 +1148,7 @@ class FDC extends Component {
|
|||
|
||||
while (this.loadDrive(iDrive, sDisketteName, sDiskettePath, false, file) < 0) {
|
||||
if (!window.confirm("Click OK to reload the original disk and discard any changes.")) {
|
||||
if (DEBUG) this.println("load cancelled");
|
||||
return;
|
||||
}
|
||||
/*
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -58010,6 +58010,12 @@ class Disk extends Component {
|
|||
for (i = 0; i < track.length; i++) {
|
||||
track[i] = this.initSector(null, iCylinder, iHead, i + 1, drive.nBytes, 0);
|
||||
}
|
||||
/*
|
||||
* TODO: This is more dodginess, because we can't be certain that every cylinder on the disk
|
||||
* will receive the same "expanded" treatment, but functions like getSector() rely on instance
|
||||
* properties (eg, this.nHeads), on the assumption that the disk's geometry is homogeneous.
|
||||
*/
|
||||
if (this.nHeads <= iHead) this.nHeads = iHead + 1;
|
||||
}
|
||||
if (track) {
|
||||
for (i = 0; i < track.length; i++) {
|
||||
|
|
@ -58052,6 +58058,12 @@ class Disk extends Component {
|
|||
*/
|
||||
if (!sector && drive.bFormatting && drive.bSector == 9) {
|
||||
sector = track[i] = this.initSector(null, iCylinder, iHead, drive.bSector, drive.nBytes, 0);
|
||||
/*
|
||||
* TODO: This is more dodginess, because we can't be certain that every track on the disk
|
||||
* will receive the same "expanded" treatment, but functions like getSector() rely on instance
|
||||
* properties (eg, this.nSectors), on the assumption that the disk's geometry is homogeneous.
|
||||
*/
|
||||
if (this.nSectors < drive.bSector) this.nSectors = drive.bSector;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -60212,6 +60224,7 @@ class FDC extends Component {
|
|||
|
||||
while (this.loadDrive(iDrive, sDisketteName, sDiskettePath, false, file) < 0) {
|
||||
if (!window.confirm("Click OK to reload the original disk and discard any changes.")) {
|
||||
if (DEBUG) this.println("load cancelled");
|
||||
return;
|
||||
}
|
||||
/*
|
||||
|
|
@ -72484,16 +72497,15 @@ class DebuggerX86 extends Debugger {
|
|||
var dbgAddrEnd = this.parseAddr(sAddrEnd, true);
|
||||
if (!dbgAddrEnd || dbgAddrEnd.off < dbgAddr.off) return;
|
||||
|
||||
cb = dbgAddrEnd.off - dbgAddr.off;
|
||||
if (!DEBUG && cb > 0x100) {
|
||||
/*
|
||||
* Limiting the amount of disassembled code to 256 bytes in non-DEBUG builds is partly to
|
||||
* prevent the user from wedging the browser by dumping too many lines, but also a recognition
|
||||
* that, in non-DEBUG builds, this.println() keeps print output buffer truncated to 8Kb anyway.
|
||||
* We now +1 the count to make the ending address inclusive (just like the dump command).
|
||||
*/
|
||||
this.println("range too large");
|
||||
return;
|
||||
}
|
||||
cb = dbgAddrEnd.off - dbgAddr.off + 1;
|
||||
if (cb < 0) cb = 1;
|
||||
/*
|
||||
* Limiting the amount of disassembled code to 4K helps prevent the user from wedging the browser.
|
||||
*/
|
||||
if (cb > 0x1000) cb = 0x1000;
|
||||
n = -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue