7 Commits
v8 ... v9
Author SHA1 Message Date
Yufeng Gao abfbb39b5f CP/M tools used version 1.x 2026-02-15 19:31:28 +10:00
Yufeng Gao 5211ba3c31 Removed screenshots 2026-02-06 23:05:05 +10:00
Yufeng Gao 78c5c9ae82 Updates and new folder structure 2026-02-04 21:28:47 +10:00
Yufeng Gao 8495cf296a Edited CHESS to match the Sargon book listing more 2026-02-01 00:04:34 +10:00
Yufeng Gao c7b866b40d General cleanup
Clean up of various source files. The CHESS program is not fully cleaned up yet.
2026-01-25 22:26:55 +10:00
Yufeng Gao 2b03858c61 More updates to the assembler 2026-01-22 23:17:51 +10:00
Yufeng Gao 794721d467 Finished ASM source reconstruction
Finished the source code reconstruction of the assembler - all labels given meaningful names.
2026-01-22 00:08:42 +10:00
46 changed files with 2069 additions and 1565 deletions
+7
View File
@@ -3,9 +3,16 @@
# 86-DOS and CP/M text files must use CRLF and have 0x1A EOF markers, we simply mark them as binary # 86-DOS and CP/M text files must use CRLF and have 0x1A EOF markers, we simply mark them as binary
*.a86 binary *.a86 binary
*.A86 binary
*.asm binary *.asm binary
*.ASM binary
*.com binary *.com binary
*.COM binary
*.doc binary *.doc binary
*.DOC binary
*.hex binary *.hex binary
*.HEX binary
*.prn binary *.prn binary
*.PRN binary
*.z80 binary *.z80 binary
*.Z80 binary
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

+3 -3
View File
@@ -9,7 +9,7 @@
</mask> </mask>
<g mask="url(#anybadge_4)"> <g mask="url(#anybadge_4)">
<path fill="#555" d="M0 0h34v20H0z"/> <path fill="#555" d="M0 0h34v20H0z"/>
<path fill="#DFB317" d="M34 0h53v20H34z"/> <path fill="#4C1" d="M34 0h53v20H34z"/>
<path fill="url(#b)" d="M0 0h87v20H0z"/> <path fill="url(#b)" d="M0 0h87v20H0z"/>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@@ -17,7 +17,7 @@
<text x="17.0" y="14">ASM</text> <text x="17.0" y="14">ASM</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="61.5" y="15" fill="#010101" fill-opacity=".3">46.31%</text> <text x="61.5" y="15" fill="#010101" fill-opacity=".3">100.0%</text>
<text x="60.5" y="14">46.31%</text> <text x="60.5" y="14">100.0%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 949 B

After

Width:  |  Height:  |  Size: 946 B

+614 -90
View File
@@ -1,164 +1,646 @@
# Building 86-DOS 0.11 # Building 86-DOS 0.11
This is a guide on building 86-DOS 0.11 from scratch, using the Cromemco Disk Operating System (CDOS) and SCP's 8086 Cross Assembler (AMS86). This is a guide on building 86-DOS 0.11 from scratch, using the Cromemco Disk
Operating System (CDOS) and SCP's 8086 Cross Assembler (AMS86).
## Requirements ## Requirements
### Hardware ### Hardware
1. A [Cromemco Z-2D machine](https://wikipedia.org/wiki/Cromemco_Z-2#Cromemco_Z-2D) with four 8" drives*. 1. A [Cromemco Z-2D machine](https://wikipedia.org/wiki/Cromemco_Z-2#Cromemco_Z-2D)
2. An [SCP 8086 S-100 machine](https://archive.org/details/byte-magazine-1979-11/page/n168/mode/1up) with the [Cromemco 4FDC](https://wikipedia.org/wiki/Cromemco_4FDC) disk controller and four 8" drives**. with four 8" drives*.
2. An [SCP 8086 S-100 machine](https://archive.org/details/byte-magazine-1979-11/page/n168/mode/1up)
with the [Cromemco 4FDC](https://wikipedia.org/wiki/Cromemco_4FDC) disk
controller and four 8" drives**.
*\*[Greg Sydney-Smith's fork of the Z80 simulator from z80pack](https://www.sydneysmith.com/wordpress/run-cdos/) can be used instead of physical hardware.*<br> *\*[Greg Sydney-Smith's fork of the Z80 simulator from z80pack](https://www.sydneysmith.com/wordpress/run-cdos/)
*\*\*[Peter Schorn's fork of the AltairZ80 simulator](https://schorn.ch/altair_2.php) can be used instead of physical hardware.* can be used instead of physical hardware.*<br>
*\*\*[Peter Schorn's fork of the AltairZ80 simulator](https://schorn.ch/altair_2.php)
can be used instead of physical hardware.*
### Software ### Software
1. [An 8" SSSD CDOS disk](./Disk%20Images/Cromemco%20CDOS%20with%20Build%20Tools.img) containing: 1. [An 8" SSSD CDOS disk](./Disk%20Images/Cromemco%20CDOS%20with%20Build%20Tools.img)
containing:
1. [The Cromemco Disk Operating System (CDOS)](https://wikipedia.org/wiki/Cromemco_DOS). 1. [The Cromemco Disk Operating System (CDOS)](https://wikipedia.org/wiki/Cromemco_DOS).
2. [SCP's 8086 Cross Assembler (ASM86)](./CPM%20Tools/README.md#asm86). 2. [SCP's 8086 Cross Assembler (ASM86)](./CPM%20Tools/README.md#asm86).
3. [My DOSGEN program](./CPM%20Tools/README.md#dosgen). 3. [My DOSGEN program](./CPM%20Tools/README.md#dosgen).
2. An [8" SSSD CDOS disk containing the 86-DOS 0.11 source code](./Disk%20Images/86-DOS%200.11%20Source%20Code.img). 2. An [8" SSSD CDOS disk containing the 86-DOS 0.11 source code](./Disk%20Images/86-DOS%200.11%20Source%20Code.img).
3. An earlier version of 86-DOS or [an existing copy of 86-DOS 0.11](./Disk%20Images/Scratch%20LARGECRO%2086-DOS.img), with <code>LARGECRO</code> drive config*. 3. An earlier version of 86-DOS or
[an existing copy of 86-DOS 0.11](./Disk%20Images/Scratch%20LARGECRO%2086-DOS.img),
with `LARGECRO` drive config*.
*\*Any version of 86-DOS 0.x (including 0.11) will do. The disk controller must be Cromemco 4FDC and the drive configuration must be <code>LARGECRO</code>. To create a bootable copy of 86-DOS 0.11 yourself from scratch, see [The Chicken and Egg Problem :: The First Egg](#the-first-egg).* *\*Any version of 86-DOS 0.x (including 0.11) will do. The disk controller must
be Cromemco 4FDC and the drive configuration must be `LARGECRO`. To create a
bootable copy of 86-DOS 0.11 yourself from scratch, see
[The Chicken and Egg Problem :: The First Egg](#the-first-egg).*
## Steps ## Steps
1. Power on the Z-2D machine and boot the CDOS disk. 1. Power on the Z-2D machine and boot the CDOS disk.
![image](./.images/img01.png) ```
CDOS version 02.36
Cromemco Disk Operating System
Copyright (c) 1978, 1980 Cromemco, Inc.
A.
```
2. Insert the 86-DOS source code disk in drive B. 2. Insert the 86-DOS source code disk in drive B.
![image](./.images/img02.png) ```
A.b:
B.dir
86DOS A86 33K ASM A86 45K
BOOT A86 3K CHESS A86 73K
CHESS DOC 1K COMMAND A86 7K
DOSIO A86 9K EDLIN A86 9K
HEX2BIN A86 3K RDCPM A86 4K
SYS A86 1K TRANS A86 16K
*** 12 Files, 20 Entries, 204 K Displayed, 37 K Left ***
B.
```
3. Insert a blank formatted 8" SSSD disk in drive C. 3. Insert a blank formatted 8" SSSD disk in drive C.
4. For each source (.A86) file on drive B: 4. For each source (`.A86`) file on drive B:
1. Assemble to .HEX object by running <code>ASM86 \<name\>.BCZ</code>. 1. Assemble to `.HEX` object by running `ASM86 <name>.BCZ`.
<br><br>
![image](./.images/img03.png) ```
B.asm86 86dos.bcz
5. Copy <code>CHESS.DOC</code> from drive B to drive C. Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
![image](./.images/img04.png)
Error Count = 0
B.asm86 asm.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 boot.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 chess.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 command.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 dosio.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 edlin.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 hex2bin.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 rdcpm.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 sys.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 trans.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.
```
5. Copy `CHESS.DOC` from drive B to drive C.
```
B.xfer c:chess.doc=b:chess.doc
XFER (Transfer) version 01.07
1K-bytes read
B.dir c:
86DOS HEX 9K ASM HEX 16K
BOOT HEX 1K CHESS HEX 9K
COMMAND HEX 3K DOSIO HEX 2K
EDLIN HEX 4K HEX2BIN HEX 1K
RDCPM HEX 2K SYS HEX 1K
TRANS HEX 8K CHESS DOC 1K
*** 12 Files, 13 Entries, 57 K Displayed, 184 K Left ***
B.
```
6. Power on the 8086 S-100 machine and boot the earlier version of 86-DOS. 6. Power on the 8086 S-100 machine and boot the earlier version of 86-DOS.
![image](./.images/img05.png) ```
7. Remove the disk in drive C of the Z-2D machine and insert it into drive C of the S-100 machine. 86-DOS version 0.11
Copyright 1980 Seattle Computer Products, Inc.
A:
```
7. Remove the disk in drive C of the Z-2D machine and insert it into drive C
of the S-100 machine.
8. Insert a blank formatted 8" SSSD disk into drive B. 8. Insert a blank formatted 8" SSSD disk into drive B.
9. For each .HEX file on drive C (except for <code>86DOS.HEX</code>, <code>BOOT.HEX</code> and <code>DOSIO.HEX</code>): 9. For each `.HEX` file on drive C (except for `86DOS.HEX`, `BOOT.HEX` and
1. Run <code>RDCPM C:\<name\>.HEX A:</code> `DOSIO.HEX`):
2. Run <code>HEX2BIN \<name\></code> 1. Run `RDCPM C:<name>.HEX A:`
2. Run `HEX2BIN <name>`
<br><br>
![image](./.images/img06.png) ```
A:rdcpm c:command.hex a:
10. Run <code>RDCPM C:CHESS.DOC A:</code>. A:hex2bin command
![image](./.images/img07.png) A:rdcpm c:rdcpm.hex a:
11. Run <code>EDLIN CHESS.DOC</code> and exit with the command <code>E</code> (to remove extra bytes at the end of <code>CHESS.DOC</code>). A:hex2bin rdcpm
![image](./.images/img08.png) A:rdcpm c:hex2bin.hex a:
12. Run <code>ERASE ????????.HEX</code> (to delete all .HEX files). A:hex2bin hex2bin
![image](./.images/img09.png) A:rdcpm c:asm.hex a:
13. Run <code>ERASE ????????.BAK</code> (to delete all .BAK files). A:hex2bin asm
![image](./.images/img10.png) A:rdcpm c:trans.hex a:
14. Run <code>CLEAR B:</code> and type <code>Y</code> (to put a filesystem on drive B). A:hex2bin trans
![image](./.images/img11.png) A:rdcpm c:sys.hex a:
15. Copy all files from drive A to drive B (to create a "fresh" and "clean" disk). A:hex2bin sys
![image](./.images/img12.png) A:rdcpm c:edlin.hex a:
A:hex2bin edlin
A:rdcpm c:chess.hex a:
A:hex2bin chess
A:
```
10. Run `RDCPM C:CHESS.DOC A:`.
```
A:rdcpm c:chess.doc a:
A:
```
11. Run `EDLIN CHESS.DOC` and exit with the command `E` (to remove extra bytes
at the end of `CHESS.DOC`).
```
A:edlin chess.doc
*e
A:
```
12. Run `ERASE ????????.HEX` (to delete all `.HEX` files).
```
A:erase ????????.hex
A:dir
COMMAND COM
RDCPM COM
HEX2BIN COM
ASM COM
TRANS COM
SYS COM
EDLIN COM
CHESS COM
CHESS BAK
CHESS DOC
A:
```
13. Run `ERASE CHESS.BAK` (to delete `CHESS.BAK`).
```
A:erase chess.bak
A:dir
COMMAND COM
RDCPM COM
HEX2BIN COM
ASM COM
TRANS COM
SYS COM
EDLIN COM
CHESS COM
CHESS DOC
A:
```
14. Run `CLEAR B:` and type `Y` (to put a filesystem on drive B).
```
A:clear b:
Erase all files (Y/N)? y
A:
```
15. Copy all files from drive A to drive B (to create a "fresh" and "clean"
disk).
```
A:copy command.com b:
A:copy rdcpm.com b:
A:copy hex2bin.com b:
A:copy asm.com b:
A:copy trans.com b:
A:copy sys.com b:
A:copy edlin.com b:
A:copy chess.com b:
A:copy chess.doc b:
A:
```
16. Remove the disk in drive B and insert it into drive D of the Z-2D machine. 16. Remove the disk in drive B and insert it into drive D of the Z-2D machine.
17. Remove the disk in drive C and insert it into drive C of the Z-2D machine. 17. Remove the disk in drive C and insert it into drive C of the Z-2D machine.
18. Go back to the Z-2D machine and change to drive C. 18. Go back to the Z-2D machine and change to drive C.
![image](./.images/img13.png) ```
B.c:
19. For <code>86DOS</code>, <code>BOOT</code> and <code>DOSIO</code>: C.
1. Run <code>DEBUG \<name\>.HEX</code>. ```
2. Quit <code>DEBUG</code> and dump the correct number of pages by running <code>SAVE \<name\>.COM \<num-pages\></code>. The number of pages is given by ⌈(<code>NEXT</code> - 0x100) ÷ 0x100⌉.
![image](./.images/img14.png) 19. For `86DOS`, `BOOT` and `DOSIO`:
1. Run `DEBUG <name>.HEX`.
2. Quit `DEBUG` and dump the correct number of pages by running
`SAVE <name>.COM <num-pages>`. The number of pages is given by
⌈(`NEXT` - 0x100) ÷ 0x100⌉.
<br><br>
20. Run <code>DOSGEN D:</code>. ```
C.debug 86dos.hex
DEBUG version 00.20
NEXT = 0DDD
NEXTM = 0DDD
-^C
C.save 86dos.com 13
![image](./.images/img15.png) C.debug boot.hex
DEBUG version 00.20
NEXT = 0160
NEXTM = 0160
-^C
C.save boot.com 1
C.debug dosio.hex
DEBUG version 00.20
NEXT = 03B1
NEXTM = 03B1
-^C
C.save dosio.com 3
C.
```
20. Run `DOSGEN D:`.
```
C.dosgen d:
System transfered
C.
```
21. The disk in drive D now contains a complete copy of 86-DOS 0.11. 21. The disk in drive D now contains a complete copy of 86-DOS 0.11.
### Source of Details ### Source of Details
If you examine the steps above, you'll notice that the disk containing the .HEX files is to be inserted into drive C of the SCP S-100 machine. Clearly, inserting the disk into any drive would work just as well. So, why did I specifically mention drive C? Well, because that's the drive Paterson used. Please refer to [Analysis of Uninitialized Data](#analysis-of-uninitialized-data) for further details. If you examine the steps above, you'll notice that the disk containing the .HEX
files is to be inserted into drive C of the SCP S-100 machine. Clearly,
inserting the disk into any drive would work just as well. So, why did I
specifically mention drive C? Well, because that's the drive Paterson used.
Please refer to
[Analysis of Uninitialised Data](#analysis-of-uninitialised-data) for further
details.
## The Chicken and Egg Problem ## The Chicken and Egg Problem
In order to create a working copy of 86-DOS 0.11 from scratch, we need an earlier version of 86-DOS. However, we don't have that. Of course, we could simply use the original 0.11 distribution disk, but then we face a problem: How was that distribution disk made in the first place? Maybe with a copy of 86-DOS 0.10? But then this leads to another question: How was 86-DOS 0.10 built? In order to create a working copy of 86-DOS 0.11 from scratch, we need an
earlier version of 86-DOS. However, we don't have that. Of course, we could
simply use the original 0.11 distribution disk, but then we face a problem:
How was that distribution disk made in the first place? Maybe with a copy of
86-DOS 0.10? But then this leads to another question: How was 86-DOS 0.10
built?
You see, to build 86-DOS, you need 86-DOS, and to get 86-DOS, you need to build 86-DOS... so how was the very first copy of 86-DOS built? You see, to build 86-DOS, you need 86-DOS, and to get 86-DOS, you need to build
86-DOS... so how was the very first copy of 86-DOS built?
### The First Egg ### The First Egg
Now, I'll guide you through creating a minimum build of 86-DOS 0.11 without the need of another copy of 86-DOS. I call this the first "egg". Now, I'll guide you through creating a minimum build of 86-DOS 0.11 without the
need of another copy of 86-DOS. I call this the first "egg".
#### Requirements #### Requirements
*Same as [Building 86-DOS 0.11 :: Requirements](#requirements).* *Same as [Building 86-DOS 0.11 :: Requirements](#requirements).*
> [!IMPORTANT] > [!IMPORTANT]
> You will need to make a temporary copy of the source code disk, because you will be modifying <code>DOSIO.A86</code> to use <code>LARGECRO</code> instead of <code>COMBCRO</code>. > You will need to make a temporary copy of the source code disk, because you
will be modifying `DOSIO.A86` to use `LARGECRO` instead of `COMBCRO`.
#### Steps #### Steps
1. Power on the Z-2D machine and boot the CDOS disk. 1. Power on the Z-2D machine and boot the CDOS disk.
2. Insert the 86-DOS source code disk (copy) in drive B. 2. Insert the 86-DOS source code disk (copy) in drive B.
3. Insert a blank formatted 8" SSSD disk in drive C. 3. Insert a blank formatted 8" SSSD disk in drive C.
4. Change to drive B and edit <code>DOSIO.A86</code> to use the <code>LARGECRO</code> drive configuration. 4. Change to drive B and edit `DOSIO.A86` to use the `LARGECRO` drive
configuration.
![image](./.images/img16.png) ```
A.b:
5. For <code>86DOS</code>, <code>BOOT</code>, <code>COMMAND</code>, <code>DOSIO</code>, <code>HEX2BIN</code> and <code>RDCPM</code>: B.edit dosio.a86
1. Assemble to .HEX object by running <code>ASM86 \<name\>.BCZ</code>.
![image](./.images/img17.png) CROMEMCO Text Editor version 00.10
*n
End of Input File
*fCOMBCRO:EQU^I
*d
*i
COMBCRO:EQU 0*
LARGECRO:EQU 0 ;4 large drives
*f^I
*d
*i
LARGECRO:EQU 1*
6. Change to drive C and for <code>86DOS</code>, <code>BOOT</code>, <code>COMMAND</code>, <code>DOSIO</code>, <code>HEX2BIN</code> and <code>RDCPM</code>: *-2t
1. Load the .HEX object to memory by running <code>DEBUG \<name\>.HEX</code>. COMBCRO:EQU 0 ;2 large drives and 1 small one
LARGECRO:EQU 1 ;4 large drives
*e
Goodbye
![image](./.images/img18.png) B.
```
2. Quit <code>DEBUG</code> and dump the correct number of pages by running <code>SAVE \<name\>.COM \<num-pages\></code>. The number of pages is given by ⌈(<code>NEXT</code> - 0x100) ÷ 0x100⌉. 5. For `86DOS`, `BOOT`, `COMMAND`, `DOSIO`, `HEX2BIN` and `RDCPM`:
1. Assemble to `.HEX` object by running `ASM86 <name>.BCZ`.
<br><br>
![image](./.images/img19.png) ```
B.asm86 86dos.bcz
![image](./.images/img20.png) Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 boot.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 command.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 dosio.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 hex2bin.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.asm86 rdcpm.bcz
Seattle Computer Products 8086 Assembler Version 1.00
Copyright 1979 by Seattle Computer Products, Inc.
Error Count = 0
B.dir c:
86DOS HEX 9K BOOT HEX 1K
COMMAND HEX 3K DOSIO HEX 2K
HEX2BIN HEX 1K RDCPM HEX 2K
*** 6 Files, 6 Entries, 18 K Displayed, 223 K Left ***
B.
```
6. Change to drive C and for `86DOS`, `BOOT`, `COMMAND`, `DOSIO`, `HEX2BIN`
and `RDCPM`:
1. Load the `.HEX` object to memory by running `DEBUG <name>.HEX`.
2. Quit `DEBUG` and dump the correct number of pages by running
`SAVE <name>.COM <num-pages>`. The number of pages is given by
⌈(`NEXT` - 0x100) ÷ 0x100⌉.
<br><br>
```
B.c:
C.debug 86dos.hex
DEBUG version 00.20
NEXT = 0DDD
NEXTM = 0DDD
-^C
C.save 86dos.com 13
C.debug boot.hex
DEBUG version 00.20
NEXT = 0160
NEXTM = 0160
-^C
C.save boot.com 1
C.debug command.hex
DEBUG version 00.20
NEXT = 05AC
NEXTM = 05AC
-^C
C.save command.com 5
C.debug dosio.hex
DEBUG version 00.20
NEXT = 03B7
NEXTM = 03B7
-^C
C.save dosio.com 3
C.debug hex2bin.hex
DEBUG version 00.20
NEXT = 0271
NEXTM = 0271
-^C
C.save hex2bin.com 2
C.debug rdcpm.hex
DEBUG version 00.20
NEXT = 044D
NEXTM = 044D
-^C
C.save rdcpm.com 4
C.dir
86DOS HEX 9K BOOT HEX 1K
COMMAND HEX 3K DOSIO HEX 2K
HEX2BIN HEX 1K RDCPM HEX 2K
86DOS COM 4K BOOT COM 1K
COMMAND COM 2K DOSIO COM 1K
HEX2BIN COM 1K RDCPM COM 1K
*** 12 Files, 12 Entries, 28 K Displayed, 213 K Left ***
C.
```
7. Insert a blank formatted 8" SSSD disk into drive D. 7. Insert a blank formatted 8" SSSD disk into drive D.
8. Run <code>DOSGEN D: N</code>. 8. Run `DOSGEN D: N`.
![image](./.images/img21.png) ```
C.dosgen d: n
System transfered
9. Pop out the disks in drives C and D, and insert them into drives C and A of the S-100 machine, respectively. C.
```
9. Pop out the disks in drives C and D, and insert them into drives C and A of
the S-100 machine, respectively.
10. Boot up the 8086 S-100 machine. 10. Boot up the 8086 S-100 machine.
![image](./.images/img22.png) ```
11. Run run <code>RDCPM C:HEX2BIN.COM A:</code> to copy <code>HEX2BIN.COM</code> over. 86-DOS version 0.11
Copyright 1980 Seattle Computer Products, Inc.
![image](./.images/img23.png) A:dir
COMMAND COM
RDCPM COM
12. The disk in drive A now contains a minimal build of 86-DOS 0.11, which can be used to facilitate the building of a complete copy of 86-DOS 0.11. A:
```
## Analysis of Uninitialized Data 11. Run run `RDCPM C:HEX2BIN.COM A:` to copy `HEX2BIN.COM` over.
### What is Uninitalized Data ```
SCP's 8086 assembler (hereinafter referred to as ASM86) supports a DS (Define Storage) pseudo-op, similar to MASM's <code>DB n DUP(?)</code>. Since ASM86 generates Intel HEX files, when it encounters a DS, it increments the program counter variable by the specified number of bytes, which, in turn, increases the address in the .HEX file. The same goes for specifying a custom put base, which literally tells the assembler to emit code at a specified address. A:rdcpm c:hex2bin.com a:
When a .HEX file is loaded, the parser reads it line by line and copies the data to the address specified at the beginning of each line. This means that if there is a gap between the addresses of two lines, which would be the case when the put base is incremented by <code>DS</code> or <code>PUT</code>, the data inside the gap will be uninitialized and, therefore, undefined. A:dir
COMMAND COM
RDCPM COM
HEX2BIN COM
A:
```
12. The disk in drive A now contains a minimal build of 86-DOS 0.11, which can
be used to facilitate the building of a complete copy of 86-DOS 0.11.
## Analysis of Uninitialised Data
### What is Uninitalised Data
SCP's 8086 assembler (hereinafter referred to as ASM86) supports a `DS` (Define
Storage) pseudo-op, similar to MASM's `DB n DUP(?)`. Since ASM86 generates
Intel HEX files, when it encounters a DS, it increments the program counter
variable by the specified number of bytes, which, in turn, increases the
address in the .HEX file. The same goes for specifying a custom put base, which
literally tells the assembler to emit code at a specified address.
When a `.HEX` file is loaded, the parser reads it line by line and copies the
data to the address specified at the beginning of each line. This means that if
there is a gap between the addresses of two lines, which would be the case when
the put base is incremented by `DS` or `PUT`, the data inside the gap will be
uninitialised and, therefore, undefined.
Suppose that I originally have this data at address `0x100`:
Suppose that I originally have this data at address <code>0x100</code>:
``` ```
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
@@ -169,7 +651,9 @@ Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000140 61 6B 20 74 68 69 73 21 ak this! 00000140 61 6B 20 74 68 69 73 21 ak this!
``` ```
Now, I load this Intel HEX file (notice the gap of 18 bytes between the second and third line): Now, I load this Intel HEX file (notice the gap of 18 bytes between the second
and third line):
``` ```
Len Addr Type Data Hash Len Addr Type Data Hash
: 1A 0100 00 2CC3EB8233940FDC4C1C9507C82F8C88237F9602D154EC95F3C6 2F : 1A 0100 00 2CC3EB8233940FDC4C1C9507C82F8C88237F9602D154EC95F3C6 2F
@@ -178,6 +662,7 @@ Now, I load this Intel HEX file (notice the gap of 18 bytes between the second a
``` ```
The memory then becomes this: The memory then becomes this:
``` ```
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
@@ -186,13 +671,15 @@ Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000120 B2 24 C9 70 61 73 73 77 6F 72 64 20 69 73 20 61 ²$Épassword is a 00000120 B2 24 C9 70 61 73 73 77 6F 72 64 20 69 73 20 61 ²$Épassword is a
00000130 62 63 31 32 33 74 CF DA 54 78 D2 CC A5 C7 9A 6D bc123tÏÚTxÒ̥ǚm 00000130 62 63 31 32 33 74 CF DA 54 78 D2 CC A5 C7 9A 6D bc123tÏÚTxÒ̥ǚm
00000140 8B D6 CB 32 62 9E DE 90 ‹ÖË2bžÞ. 00000140 8B D6 CB 32 62 9E DE 90 ‹ÖË2bžÞ.
``` ```
The 18-byte buffer at offset <code>0x123</code> is what we call uninitialized data, which in this case, happens to contain the leftover string <code>password is abc123</code>. The 18-byte buffer at offset `0x123` is what we call uninitialised data, which
in this case, happens to contain the leftover string `password is abc123`.
#### Case Study: CHESS.COM #### Case Study: `CHESS.COM`
Let's take a look at this fragment of uninitialized data at offset <code>0x64</code> of <code>CHESS.COM</code>. It's only 156 bytes, but you will be surprised by the amount of information that can be inferred from these bits. Let's take a look at this fragment of uninitialised data at offset `0x64` of
`CHESS.COM`. It's only 156 bytes, but you will be surprised by the amount of
information that can be inferred from these bits.
``` ```
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
@@ -207,10 +694,15 @@ Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
000000D0 00 00 53 55 50 43 48 45 53 53 43 4F 4D 00 00 00 ..SUPCHESSCOM... 000000D0 00 00 53 55 50 43 48 45 53 53 43 4F 4D 00 00 00 ..SUPCHESSCOM...
000000E0 32 88 89 8A 8B 8C 8D 8E 00 00 00 00 00 00 00 00 2ˆ‰Š‹Œ.Ž........ 000000E0 32 88 89 8A 8B 8C 8D 8E 00 00 00 00 00 00 00 00 2ˆ‰Š‹Œ.Ž........
000000F0 00 00 44 41 4E 20 20 20 20 20 20 20 20 00 00 00 ..DAN ... 000000F0 00 00 44 41 4E 20 20 20 20 20 20 20 20 00 00 00 ..DAN ...
``` ```
What we first see is a string <code>ile name\r\n$</code>. If we examine <code>RDCPM.COM</code>, we will see that it has the exact same string at offset <code>0x1D5</code>. So, we are probably looking at a partial memory dump of <code>RDCPM</code>. There is a 1-byte size difference between that copy of <code>RDCPM.COM</code> and 86-DOS 0.11's <code>RDCPM.COM</code>, because the string ends at offset <code>0xE</code> of that paragraph instead of <code>0xF</code>. Since we have identified the origin of the data, we can take a look at the <code>RDCPM</code> source code to determine the meaning of the rest of the data. What we first see is a string `ile name\r\n$`. If we examine `RDCPM.COM`, we
will see that it has the exact same string at offset `0x1D5`. So, we are
probably looking at a partial memory dump of `RDCPM`. There is a 1-byte size
difference between that copy of `RDCPM.COM` and 86-DOS 0.11's `RDCPM.COM`,
because the string ends at offset `0xE` of that paragraph instead of `0xF`.
Since we have identified the origin of the data, we can take a look at the
`RDCPM` source code to determine the meaning of the rest of the data.
```x86asm ```x86asm
BADFN: DB 13,10,"Bad file name",13,10,"$" BADFN: DB 13,10,"Bad file name",13,10,"$"
@@ -219,11 +711,17 @@ DSTFCB: DS 32
DB 0 DB 0
DIRBUF: DS 128 DIRBUF: DS 128
``` ```
The byte at <code>0x6F</code> is the <code>DRIVE</code> variable, which holds the drive ID of the CP/M disk. A value of <code>0x02</code> signifies drive C. Next comes <code>DSTFCB</code>, the FCB of the destination file. We can see from the first 12 bytes that it's the file <code>A:CHESS.HEX</code>. This gives us the <code>RDCPM</code> command line <code>RDCPM C:CHESS.HEX A:</code>. The byte at `0x6F` is the `DRIVE` variable, which holds the drive ID of the
CP/M disk. A value of `0x02` signifies drive C. Next comes `DSTFCB`, the FCB of
the destination file. We can see from the first 12 bytes that it's the file
`A:CHESS.HEX`. This gives us the `RDCPM` command line `RDCPM C:CHESS.HEX A:`.
If we look further at <code>DSTFCB</code>, we will notice that it does not actually match up with the FCB format of 86-DOS 0.11. This strongly suggests that <code>RDCPM</code> was run under an earlier version of 86-DOS. If we look further at `DSTFCB`, we will notice that it does not actually match
up with the FCB format of 86-DOS 0.11. This strongly suggests that `RDCPM` was
run under an earlier version of 86-DOS.
After the FCB, we have <code>DIRBUF</code>, which holds a directory sector of the CP/M disk. We can decode it: After the FCB, we have `DIRBUF`, which holds a directory sector of the CP/M
disk. We can decode it:
| Filename | Size | Blocks | Block List | | Filename | Size | Blocks | Block List |
| - | - | - | - | | - | - | - | - |
@@ -232,19 +730,31 @@ After the FCB, we have <code>DIRBUF</code>, which holds a directory sector of th
| SUPCHESS.COM | 6400 | 7 | 136, 137, 138, 139, 140, 141, 142 | | SUPCHESS.COM | 6400 | 7 | 136, 137, 138, 139, 140, 141, 142 |
| DAN | ? | ? | ? | | DAN | ? | ? | ? |
I have no idea what <code>PRILSTDL</code> was; if I had to guess, it probably had something to do with the printing of assembly language listings. <code>SUPCHESS.HEX</code> had the exact same size as the .HEX file for 86-DOS 0.11's <code>CHESS</code> program, and <code>SUPCHESS.COM</code> had the same size as <code>CHESS.COM</code>, so <code>SUPCHESS</code> thing was just <code>CHESS</code>. I doubt anyone will ever be able figure out what <code>DAN</code> was. I have no idea what `PRILSTDL` was; if I had to guess, it probably had
something to do with the printing of assembly language listings. `SUPCHESS.HEX`
had the exact same size as the `.HEX` file for 86-DOS 0.11's `CHESS` program,
and `SUPCHESS.COM` had the same size as `CHESS.COM`, so the `SUPCHESS` thing
was just `CHESS`. I doubt anyone will ever be able to figure out what `DAN`
was.
The most crucial information we can infer from this directory fragment is the format of the CP/M disk in drive C. <code>RDCPM</code> only ever supported 2 CP/M disk formats out of the box - the standard 8" SSSD format with a sector skew of 6, and the 5" Cromemco format with a sector skew of 5. The largest block number for the 5" format is about 82, so based on this alone, we can deduce that this directory fragment belonged to an 8" disk. The most crucial information we can infer from this directory fragment is the
format of the CP/M disk in drive C. `RDCPM` only ever supported 2 CP/M disk
formats out of the box - the standard 8" SSSD format with a sector skew of 6,
and the 5" Cromemco format with a sector skew of 5. The largest block number
for the 5" format is about 82, so based on this alone, we can deduce that this
directory fragment belonged to an 8" disk.
##### Summary (TL;DR) ##### Summary (TL;DR)
1. The file <code>CHESS.HEX</code> file was converted to <code>CHESS.COM</code> under 86-DOS. 1. The file `CHESS.HEX` was converted to `CHESS.COM` under 86-DOS.
2. <code>RDCPM</code> was used to copy <code>CHESS.HEX</code> from a CP/M disk. 2. `RDCPM` was used to copy `CHESS.HEX` from a CP/M disk.
3. The <code>RDCPM</code> command was <code>RDCPM C:CHESS.HEX A:</code>. 3. The `RDCPM` command was `RDCPM C:CHESS.HEX A:`.
4. The disk in drive C was a standard 8" SSSD CP/M disk. 4. The disk in drive C was a standard 8" SSSD CP/M disk.
1. Given that drive C was 8", the drive configuration was <code>LARGECRO</code>. 1. Given that drive C was 8", the drive configuration was `LARGECRO`.
#### Case Study: `SYS.COM`
`SYS.COM` also has some uninitialised data, this time only a partial directory
sector.
#### Case Study: SYS.COM
<code>SYS.COM</code> also has some uninitialized data, this time only a partial directory sector.
``` ```
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
@@ -256,6 +766,7 @@ Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
000000E0 05 26 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .&.............. 000000E0 05 26 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .&..............
000000F0 00 00 43 4F 4D 4D 41 4E 44 20 48 45 58 00 00 00 ..COMMAND HEX... 000000F0 00 00 43 4F 4D 4D 41 4E 44 20 48 45 58 00 00 00 ..COMMAND HEX...
``` ```
| Filename | Size | Blocks | Block List | | Filename | Size | Blocks | Block List |
| - | - | - | - | | - | - | - | - |
| ?.A86 | 5504 | 6 | 76, 77, 92, 104, 105, 106 | | ?.A86 | 5504 | 6 | 76, 77, 92, 104, 105, 106 |
@@ -263,9 +774,22 @@ Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
| SYS.BAK | 640 | 1 | 38 | | SYS.BAK | 640 | 1 | 38 |
| COMMAND.HEX | ? | ? | ? | | COMMAND.HEX | ? | ? | ? |
There's nothing particularly interesting here, but <code>SYS.BAK</code> (presumably produced by editing <code>SYS.A86</code> with <code>EDIT</code> or WordMaster) had the exact same size as my reconstructed <code>SYS.A86</code>, so my <code>SYS</code> disassembly can't be too far off the original. I'm not sure what that .A86 file was, but my educated guess is it was <code>COMMAND.A86</code>. There's nothing particularly interesting here, but `SYS.BAK` (presumably
produced by editing `SYS.A86` with `EDIT` or WordMaster) had the exact same
size as my reconstructed `SYS.A86`, so my `SYS` disassembly can't be too far
off the original. I'm not sure what that `.A86` file was, but my educated guess
is it was `COMMAND.A86`.
#### File Sizes and RDCPM #### File Sizes and `RDCPM`
The size of files copied off CP/M disks should always be multiples of the block size of the CP/M disk, because <code>RDCPM</code> completely ignores the record count and uses only the block pointers to determine when to stop reading. For instance, if the record size is 1K and the file size is 128, when transferred to a DOS disk with <code>RDCPM</code>, it will be 1024 bytes long. The size of files copied off of CP/M disks should always be multiples of the
block size of the CP/M disk, because `RDCPM` completely ignores the record
count and uses only the block pointers to determine when to stop reading. For
instance, if the record size is 1K and the file size is 128, when transferred
to a DOS disk with `RDCPM`, it will be 1024 bytes long.
Since none of the files on the original 86-DOS 0.11 distribution disk are exact multiples of 1K, none of them were directly transferred from CP/M disks. This implies that all the .COM binaries were generated by <code>HEX2BIN</code> from .HEX files copied off CP/M disks. <code>CHESS.DOC</code> was either created from scratch under 86-DOS, or transferred from a CP/M disk and then edited by <code>EDLIN</code> under 86-DOS. Since none of the files on the original 86-DOS 0.11 distribution disk are exact
multiples of 1K, none of them were directly transferred from CP/M disks. This
implies that all the `.COM` binaries were generated by `HEX2BIN` from `.HEX`
files read from CP/M disks. `CHESS.DOC` was either created from scratch under
86-DOS, or transferred from a CP/M disk and then edited by `EDLIN` under
86-DOS.
Binary file not shown.
+290 -420
View File
File diff suppressed because it is too large Load Diff
+104 -26
View File
@@ -1,16 +1,34 @@
# CP/M Building Tools # CP/M Building Tools
This folder contains some of the Z80 tools required for building and deploying 86-DOS 0.11 under CP/M (or Cromemco CDOS, the operating system [@TimPaterson](https://github.com/TimPaterson) used). You will need these if you wish to create a working copy of 86-DOS 0.11 from pure source code. This folder contains some of the Z80 tools required for building and deploying
86-DOS 0.11 under CP/M (or Cromemco CDOS, the operating system
[@TimPaterson](https://github.com/TimPaterson) used). You will need these if
you wish to create a working copy of 86-DOS 0.11 from pure source code.
> [!WARNING] > [!WARNING]
> These tools have only been tested under Cromemco CDOS 2.x. There is no guarantee that they will work under the official CP/M operating system or other CP/M-like operating systems. The source files are to be assembled using Cromemco's CDOS Z80 assembler, and you must have a Z80 CPU to run the binaries. > These tools have only been tested under Cromemco CDOS 2.x. There is no
guarantee that they will work under the official CP/M operating system or
other CP/M-like operating systems. The source files are to be assembled using
Cromemco's CDOS Z80 assembler, and you must have a Z80 CPU to run the binaries.
## ASM86 ## ASM86
This is a reconstruction of the SCP Z80/8086 Cross Assembler [@TimPaterson](https://github.com/TimPaterson) used to develop 86-DOS. Original copies of this cross assembler are long gone, and the only thing we have now is [a manual](https://bitsavers.org/pdf/seattleComputer/Z80_8086_Cross_Assembler_Preliminary.pdf) for it. Given that the 86-DOS <code>ASM</code> assembler is essentially an 8086 translation of this assembler, I wrote a utility that does the exact opposite of <code>TRANS</code> (named CIS) to translate 86-DOS 0.11's assembler back to Z80. After making some minor tweaks to the output, I was able to make it work, so here it is. This is a reconstruction of the SCP Z80/8086 Cross Assembler
[@TimPaterson](https://github.com/TimPaterson) used to develop 86-DOS. Original
copies of this cross assembler are long gone, and the only thing we have now is
[a manual](https://bitsavers.org/pdf/seattleComputer/Z80_8086_Cross_Assembler_Preliminary.pdf)
for it. Given that the 86-DOS `ASM` assembler is essentially an 8086
translation of this assembler, I wrote a utility that does the exact opposite
of `TRANS` (named CIS) to translate 86-DOS 0.11's assembler back to Z80. After
making some minor tweaks to the output, I was able to make it work, so here it
is.
> [!TIP] > [!TIP]
> The Z80 source of the assembler is actually easier to read than the 8086 source because this assembler was originally written in the Z80 assembly language. When it was translated to 8086, a lot of boilerplate code were added, which made the code slightly difficult to follow. Now that it has been translated back to Z80, those boilerplate code have been removed. > The Z80 source of the assembler is actually easier to read than the 8086
source because this assembler was originally written in the Z80 assembly
language. When it was translated to 8086, a lot of boilerplate code were added,
which made the code slightly difficult to follow. Now that it has been
translated back to Z80, those boilerplate code have been removed.
ASM86 takes the following parameters: <code>[x:]ASM86 [y:]name[.ijk] [S]</code> ASM86 takes the following parameters: `[x:]ASM86 [y:]name[.ijk] [S]`
where where
@@ -22,36 +40,67 @@ where
<tbody> <tbody>
<tr> <tr>
<td>x</td> <td>x</td>
<td>is an optional disk drive specifier indicating the location of the <code>ASM86.COM</code> file. This parameter is required only if the COM file is <u>NOT</u> located on either drive A or the current drive. Legal values are A, B, C, and D.</td> <td>
is an optional disk drive specifier indicating the location of
the <code>ASM86.COM</code> file. This parameter is required
only if the COM file is <u>NOT</u> located on either drive A or
the current drive. Legal values are A, B, C, and D.
</td>
</tr> </tr>
<tr> <tr>
<td>y</td> <td>y</td>
<td>is an optional disk drive specifier indicating the location of the source file. This paramter may be omitted if the source file is on the current drive.</td> <td>
is an optional disk drive specifier indicating the location of
the source file. This paramter may be omitted if the source
file is on the current drive.
</td>
</tr> </tr>
<tr> <tr>
<td>name</td> <td>name</td>
<td>is the name of the 8086 assembly language source file, without the 3-letter extension. The extension <code>A86</code> is always assumed and may not be overriden.</td> <td>
is the name of the 8086 assembly language source file, without
the 3-letter extension. The extension <code>A86</code> is
always assumed and may not be overriden.
</td>
</tr> </tr>
<tr> <tr>
<td>ijk</td> <td>ijk</td>
<td>is an optional 3-letter drive assigment parameter. The first letter is the name of the drive on which the source file will be found. This overrides a disk specifier which precedes the file name. The second letter is the name of the drive to which the hex object file will be written, or <code>Z</code> if no object file is desired. The third letter is the name of the drive to which the listing file will be written, or <code>X</code> to send the listing to the console, or <code>Z</code> if no listing file is desired. Assembling with no listing is much faster since the source file will not be read from disk a second time.</td> <td>
is an optional 3-letter drive assigment parameter. The first
letter is the name of the drive on which the source file will
be found. This overrides a disk specifier which precedes the
file name. The second letter is the name of the drive to which
the hex object file will be written, or <code>Z</code> if no
object file is desired. The third letter is the name of the
drive to which the listing file will be written, or
<code>X</code> to send the listing to the console, or
<code>Z</code> if no listing file is desired. Assembling with
no listing is much faster since the source file will not be
read from disk a second time.
</td>
</tr> </tr>
<tr> <tr>
<td><code>S</code></td> <td><code>S</code></td>
<td>is an optional switch indicating that a symbol table is to be placed at the end of the listing.</td> <td>
is an optional switch indicating that a symbol table is to be
placed at the end of the listing.
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
This assembler can only produce Intel HEX files for object code, therefore you must convert them to binary before they can be executed on the 8086. Under CP/M, this can be done using the <code>LOAD</code> command. If you are using CDOS, which does not have <code>LOAD</code>, you will have to use <code>DEBUG</code> to load the .HEX file to memory and <code>SAVE</code> to save the loaded pages as a disk file. This assembler can only produce Intel HEX files for object code, therefore you
must convert them to binary before they can be executed on the 8086. Under
> [!TIP] CP/M, this can be done using the `LOAD` command. If you are using CDOS, which
> Don't forget to rename the source files from <code>.ASM</code> to <code>.A86</code>. does not have `LOAD`, you will have to use `DEBUG` to load the .HEX file to
memory and `SAVE` to save the loaded pages as a disk file.
## TRANS86 ## TRANS86
This is a reconstruction of the SCP Z80 to 8086 Translator shipped together with ASM86. Like ASM86, original copies are long gone and this is the 8086 version from 86-DOS 0.11 translated back to Z80. This is a reconstruction of the SCP Z80 to 8086 Translator shipped together
with ASM86. Like ASM86, original copies are long gone and this is the 8086
version from 86-DOS 0.11 translated back to Z80.
TRANS86 takes the following parameters: <code>[x:]TRANS86 [y:]name.ext</code> TRANS86 takes the following parameters: `[x:]TRANS86 [y:]name.ext`
where where
@@ -63,25 +112,39 @@ where
<tbody> <tbody>
<tr> <tr>
<td>x</td> <td>x</td>
<td>is an optional disk drive specifier indicating the location of the <code>TRANS86.COM</code> file. This parameter is required only if the COM file is <u>NOT</u> located on either drive A or the current drive. Legal values are A, B, C, and D.</td> <td>
is an optional disk drive specifier indicating the location of
the <code>TRANS86.COM</code> file. This parameter is required
only if the COM file is <u>NOT</u> located on either drive A or
the current drive. Legal values are A, B, C, and D.
</td>
</tr> </tr>
<tr> <tr>
<td>y</td> <td>y</td>
<td>is an optional disk drive specifier indicating the location of the Z80 source file. This paramter may be omitted if the source file is on the current drive.</td> <td>
is an optional disk drive specifier indicating the location of
the Z80 source file. This paramter may be omitted if the source
file is on the current drive.
</td>
</tr> </tr>
<tr> <tr>
<td>name.ext</td> <td>name.ext</td>
<td>is the name of the Z80 assembly language source file, with the 3-letter extension.</td> <td>
is the name of the Z80 assembly language source file, with the
3-letter extension.
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
The output 8086 source file will have the same name as the Z80 source file, but with the extension .A86. The output 8086 source file will have the same name as the Z80 source file, but
with the extension .A86.
## DOSGEN ## DOSGEN
This is a tool I wrote to copy 86-DOS system files to the system area of IBM 8" SSSD floppies. It works in a similar way to CP/M's <code>SYSGEN</code> utility. This is a tool I wrote to copy 86-DOS system files to the system area of IBM 8"
SSSD floppies. It works in a similar way to CP/M's `SYSGEN` utility.
DOSGEN takes the following parameters: <code>[x:]DOSGEN y: [N]</code> DOSGEN takes the following parameters: `[x:]DOSGEN y: [N]`
where where
@@ -93,17 +156,32 @@ where
<tbody> <tbody>
<tr> <tr>
<td>x</td> <td>x</td>
<td>is an optional disk drive specifier indicating the location of the <code>DOSGEN.COM</code> file. This parameter is required only if the COM file is <u>NOT</u> located on either drive A or the current drive. Legal values are A, B, C, and D.</td> <td>
is an optional disk drive specifier indicating the location of
the <code>DOSGEN.COM</code> file. This parameter is required
only if the COM file is <u>NOT</u> located on either drive A or
the current drive. Legal values are A, B, C, and D.
</td>
</tr> </tr>
<tr> <tr>
<td>y</td> <td>y</td>
<td>is a disk drive specifier indicating the disk upon which the 86-DOS system is to be written.</td> <td>
is a disk drive specifier indicating the disk upon which the
86-DOS system is to be written.
</td>
</tr> </tr>
<tr> <tr>
<td><code>N</code></td> <td><code>N</code></td>
<td>is an optional switch indicating that a new file system is to be put on the destination disk. If this switch is specified, a file system with the files <code>COMMAND.COM</code> and <code>RDCPM.COM</code> will be written alongside the system.</td> <td>
is an optional switch indicating that a new file system is to
be put on the destination disk. If this switch is specified, a
file system with the files <code>COMMAND.COM</code> and
<code>RDCPM.COM</code> will be written alongside the system.
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
To copy 86-DOS to a new floppy disk, you must have the files <code>BOOT.COM</code>, <code>DOSIO.COM</code> and <code>86DOS.COM</code> on the current drive. If a new file system is to be created, <code>COMMAND.COM</code> and <code>RDCPM.COM</code> must also exist. To copy 86-DOS to a new floppy disk, you must have the files `BOOT.COM`,
`DOSIO.COM` and `86DOS.COM` on the current drive. If a new file system is to
be created, `COMMAND.COM` and `RDCPM.COM` must also exist.
Binary file not shown.
+12 -12
View File
@@ -1,4 +1,4 @@
; Z80 to 8086 Translator version 2.0 ; Z80 to 8086 Translator version 1.0
; Runs on the Z80 under CP/M ; Runs on the Z80 under CP/M
; by Tim Paterson ; by Tim Paterson
; ;
@@ -182,20 +182,20 @@ GETCH:
LD DE,GETBUF ; Set `DMA address'. LD DE,GETBUF ; Set `DMA address'.
LD C,SETDMA LD C,SETDMA
CALL SYSTEM CALL SYSTEM
LD DE,FCB ; Read the next record from source file. LD DE,FCB ; Read the next record from source file.
LD C,READ LD C,READ
CALL SYSTEM CALL SYSTEM
OR A ; Entire record read OK? OR A ; Entire record read OK?
LD A,EOF ; Force end-of-file character in case LD A,EOF ; Force end-of-file character in case
JR NZ,TESEND ; there is nothing in the record. JR NZ,TESEND ; there is nothing in the record.
LD HL,GETBUF ; Reset buffer pointer. LD HL,GETBUF ; Reset buffer pointer.
GETIT: GETIT:
LD A,(HL) ; Get next character from buffer. LD A,(HL) ; Get next character from buffer.
INC HL ; Point to next character. INC HL ; Point to next character.
LD (GETPT),HL ; Save new pointer. LD (GETPT),HL ; Save new pointer.
TESEND: TESEND:
LD (CHAR),A LD (CHAR),A
JR NOTAF ; Pop registers and return. JR NOTAF ; Pop registers and return.
LOAD: LOAD:
CALL DELIM CALL DELIM
JR Z,LOADOP JR Z,LOADOP
@@ -450,7 +450,7 @@ LD:
JP Z,STAX JP Z,STAX
;If immediate move, check for byte memory reference ;If immediate move, check for byte memory reference
LD A,(OP1) LD A,(OP1)
CP '[' ;Memory reference? CP '[' ;Memory reference?
JR NZ,TWOOPS JR NZ,TWOOPS
LD A,(OP1+1) ;Referencing IX as a word? LD A,(OP1+1) ;Referencing IX as a word?
CP RIX CP RIX
@@ -458,7 +458,7 @@ LD:
CP RIY CP RIY
JR Z,TWOOPS JR Z,TWOOPS
LD A,(OP2) LD A,(OP2)
CP 20H ;Could be immediate? CP 20H ;Could be immediate?
LD A,9 LD A,9
CALL NC,BFLAG ;Add "B," CALL NC,BFLAG ;Add "B,"
CALL TRAN1 CALL TRAN1
@@ -661,7 +661,7 @@ DAD:
INCDEC: INCDEC:
LD A,(OP1) LD A,(OP1)
CP RCX+1 ;16-bit? CP RCX+1 ;16-bit?
JP NC,ONEOP JP NC,ONEOP
LD HL,LAHF LD HL,LAHF
CALL OUTSTR CALL OUTSTR
@@ -1081,7 +1081,7 @@ RWTAB:
DB 'ABCDEHLBDHSACNZNPMPPII' DB 'ABCDEHLBDHSACNZNPMPPII'
LENRW: EQU $-RWTAB LENRW: EQU $-RWTAB
DB 0,0,0,0,0,0,0,'CELPF',0,'C',0,'Z',0,0,'OEYX' DB 0,0,0,0,0,0,0,'CELPF',0,'C',0,'Z',0,0,'OEYX'
HEADER: DB 13,10,'Z80 to 8086 Translator version 2.0',13,10,'$' HEADER: DB 13,10,'Z80 to 8086 Translator version 1.0',13,10,'$'
NOROOM: DB 13,10,'Insufficient directory space to create file',13,10,'$' NOROOM: DB 13,10,'Insufficient directory space to create file',13,10,'$'
NOFILE: DB 13,10,'File not found',13,10,'$' NOFILE: DB 13,10,'File not found',13,10,'$'
ENDMES: DB 13,10,'Translation complete',13,10,'$' ENDMES: DB 13,10,'Translation complete',13,10,'$'
@@ -1123,4 +1123,4 @@ RCH: DS 1
RAL: DS 1 RAL: DS 1
RIX: DS 1 RIX: DS 1
RIY: DS 1 RIY: DS 1
 
Binary file not shown.
Binary file not shown.
+44 -13
View File
@@ -1,34 +1,65 @@
# 86-DOS 0.11 Source Code Reconstruction # 86-DOS 0.11 Source Code Reconstruction
Full source code reconstruction of 86-DOS 0.11 - the earliest released version of the earliest operating system for the Intel x86 architecture. Full source code reconstruction of 86-DOS 0.11 - the earliest released version
of the earliest operating system for the Intel x86 architecture.
> [!IMPORTANT] > [!IMPORTANT]
> All 8086 assembly language source files in this repository use the extension `.A86`, because 86-DOS was originally assembled using the SCP Z80/8086 Cross Assembler running under Cromemco CDOS. To build 86-DOS under 86-DOS itself or MS-DOS, you would have to rename all `.A86` files to `.ASM`. > All 8086 assembly language source files in this repository use the extension
`.A86`, because 86-DOS was originally assembled using the SCP Z80/8086 Cross
Assembler running under Cromemco CDOS. To build 86-DOS under 86-DOS itself or
MS-DOS, you would have to rename all `.A86` files to `.ASM`.
## Progress ## Progress
<img src="./.progress/boot.svg"> <img src="./.progress/bios.svg"> <img src="./.progress/kernel.svg"> <img src="./.progress/asm.svg"> <img src="./.progress/chess.svg"> <img src="./.progress/command.svg"> <img src="./.progress/edlin.svg"> <img src="./.progress/hex2bin.svg"> <img src="./.progress/rdcpm.svg"> <img src="./.progress/sys.svg"> <img src="./.progress/trans.svg"> <img src="./.progress/boot.svg"> <img src="./.progress/bios.svg">
<img src="./.progress/kernel.svg"> <img src="./.progress/asm.svg">
<img src="./.progress/chess.svg"> <img src="./.progress/command.svg">
<img src="./.progress/edlin.svg"> <img src="./.progress/hex2bin.svg">
<img src="./.progress/rdcpm.svg"> <img src="./.progress/sys.svg">
<img src="./.progress/trans.svg">
## Author ## Author
This software was written by [@TimPaterson](https://github.com/TimPaterson) in 1980. The reconstructed source code in this repository compiles back to the exact same binaries shipped by Seattle Computer Products. Therefore, it can be fully regrded as Paterson's work. This software was written by [@TimPaterson](https://github.com/TimPaterson) in
1980. The reconstructed source code in this repository compiles back to the
exact same binaries shipped by Seattle Computer Products. Therefore, it can be
fully regrded as Paterson's work.
> [!IMPORTANT] > [!IMPORTANT]
> Please do not file feature requests or make pull requests to fix bugs in the code. This is not my OS and I want this important piece of digital computing history to be preserved in its most original state. I will not accept anything that alters the assembled binaries in any way, shape or form. > Please do not file feature requests or make pull requests to fix bugs in the
code. This is not my OS and I want this important piece of digital computing
history to be preserved in its most original state. I will not accept anything
that alters the assembled binaries in any way, shape or form.
## Disclaimer ## Disclaimer
This source code reconstruction is a product of reverse engineering. It is important to note that Microsoft Corporation has not released the source code for this specific version of DOS, and its legality may be in a gray area. This source code reconstruction is a product of reverse engineering. It is
important to note that Microsoft Corporation has not released the source code
for this specific version of DOS, and its legality may be in a gray area.
The source code reconstruction was undertaken with the understanding that Microsoft Corporation has open-sourced later versions of this operating system under the name MS-DOS, under the MIT License. The intention behind this source code reconstruction project is purely for historical and educational purposes, with a focus on preserving the heritage of early computing. The source code reconstruction was undertaken with the understanding that
Microsoft Corporation has open-sourced later versions of this operating system
under the name MS-DOS, under the MIT License. The intention behind this source
code reconstruction project is purely for historical and educational purposes,
with a focus on preserving the heritage of early computing.
While efforts have been made to ensure compliance with applicable laws and regulations, the legal status of this source code reconstruction project may not be entirely clear. Users are advised to exercise caution and seek legal advice before using or redistributing any code extracted from this repository. While efforts have been made to ensure compliance with applicable laws and
regulations, the legal status of this source code reconstruction project may
not be entirely clear. Users are advised to exercise caution and seek legal
advice before using or redistributing any code extracted from this repository.
This project acknowledges the intellectual property rights of Microsoft Corporation and does not seek to infringe upon any proprietary rights. The reconstructed source code is shared in the spirit of historical preservation, education, and appreciation for this wonderful operating system. This project acknowledges the intellectual property rights of Microsoft
Corporation and does not seek to infringe upon any proprietary rights. The
reconstructed source code is shared in the spirit of historical preservation,
education, and appreciation for this wonderful operating system.
By accessing and using the reconstructed source code provided in this repository, you agree to do so at your own risk and assume all responsibility for any legal implications that may arise. By accessing and using the reconstructed source code provided in this
repository, you agree to do so at your own risk and assume all responsibility
for any legal implications that may arise.
## Building ## Building
*See [Building 86-DOS 0.11](./Building.md).* *See [Building 86-DOS 0.11](./Building.md).*
## Special Thanks ## Special Thanks
* [@TimPaterson](https://github.com/TimPaterson) - For writing this amazing OS. * [@TimPaterson](https://github.com/TimPaterson) - For writing this amazing OS
and providing the source code of 86-DOS 1.00.
* [@geneb](https://github.com/geneb) - For providing a copy of 86-DOS 0.11. * [@geneb](https://github.com/geneb) - For providing a copy of 86-DOS 0.11.
* [@LucasBrooks](https://github.com/LucasBrooks) - For providing an 86-DOS 1.14 kernel disassembly and for documenting the DPB structure. * [@RichCini](https://github.com/RichCini) - For figuring out some
* [@RichCini](https://github.com/RichCini) - For figuring out some hard-to-decipher logic and for testing and debugging the reconstructed Tarbell-specific code on physical hardware. hard-to-decipher logic and for testing and debugging the reconstructed
Tarbell-specific code on physical hardware.
File diff suppressed because it is too large Load Diff
+319 -434
View File
File diff suppressed because it is too large Load Diff
View File
File diff suppressed because it is too large Load Diff
View File
+45 -41
View File
@@ -1,32 +1,32 @@
FCB EQU 5CH FCB: EQU 5CH
DSKRESET EQU 13 DSKRESET:EQU 13
SETBASE EQU 38 SETBASE:EQU 38
SRCHFRST EQU 17 SRCHFRST:EQU 17
SRCHNXT EQU 18 SRCHNXT:EQU 18
RENAM EQU 23 RENAM: EQU 23
INCHAR EQU 1 INCHAR: EQU 1
GETFAT EQU 27 GETFAT: EQU 27
OPEN EQU 15 OPEN: EQU 15
CLOSE EQU 16 CLOSE: EQU 16
MAKE EQU 22 MAKE: EQU 22
DELETE EQU 19 DELETE: EQU 19
RDBLK EQU 39 RDBLK: EQU 39
WRBLK EQU 40 WRBLK: EQU 40
SETDMA EQU 26 SETDMA: EQU 26
SELDRV EQU 14 SELDRV: EQU 14
GETDRV EQU 25 GETDRV: EQU 25
PRINTBUF EQU 9 PRINTBUF:EQU 9
OUTCH EQU 2 OUTCH: EQU 2
INBUF EQU 10 INBUF: EQU 10
RR EQU 33 RR: EQU 33
SYSTEM EQU 5 SYSTEM: EQU 5
ORG 100H ORG 100H
PUT 100H PUT 100H
MOV SP,STACK MOV SP,STACK
CLD CLD
MOV DL,0 ;Start with A: MOV DL,0 ;Start with drive A
SETDRV: SETDRV:
MOV CL,SELDRV MOV CL,SELDRV
CALL SYSTEM CALL SYSTEM
@@ -60,7 +60,7 @@ GETCOM:
CALL SYSTEM ;Print drive letter CALL SYSTEM ;Print drive letter
MOV DL,":" MOV DL,":"
MOV CL,OUTCH MOV CL,OUTCH
CALL SYSTEM ;Print : CALL SYSTEM ;Print ":"
MOV DX,LINBUF MOV DX,LINBUF
MOV CL,INBUF MOV CL,INBUF
CALL SYSTEM CALL SYSTEM
@@ -87,7 +87,7 @@ GETCOM:
PUSH SI PUSH SI
COMTAIL: COMTAIL:
LODB LODB
STOB ;Move command tail to 80H STOB ;Move command tail to 80H
CMP AL,13 CMP AL,13
LOOPNZ COMTAIL LOOPNZ COMTAIL
NOT CL NOT CL
@@ -113,16 +113,17 @@ FINDCOM:
LAHF LAHF
ADD SI,CX ;Bump to next position without affecting flags ADD SI,CX ;Bump to next position without affecting flags
SAHF SAHF
LODW ;Get address of command LODW ;Get address of command
JNZ FINDCOM JNZ FINDCOM
CALL AX ;Call command CALL AX ;Call command
JMP COMMAND JMP COMMAND
SETDRV1:
JMP SETDRV SETDRVJ:JMP SETDRV
DRVCHK: DRVCHK:
DEC DL ;Adjust for correct drive number DEC DL ;Adjust for correct drive number
DEC AL ;Check if anything else is on line DEC AL ;Check if anything else is on line
JZ SETDRV1 JZ SETDRVJ
EXTERNAL: EXTERNAL:
MOV AL,[SPECDRV] MOV AL,[SPECDRV]
MOV [IDLEN],AL MOV [IDLEN],AL
@@ -198,7 +199,7 @@ FILEDRV:
JZ NOMATCH JZ NOMATCH
CMP B,[SI],":" CMP B,[SI],":"
JNZ NOMATCH JNZ NOMATCH
SUB AL,40H ;A => 1, B => 2 SUB AL,40H ;Convert to drive number
INC SI INC SI
RET RET
@@ -308,7 +309,7 @@ TYPE:
MOV AH,OPEN MOV AH,OPEN
INT 33 INT 33
OR AL,AL OR AL,AL
JNZ RET ; Not found JNZ RET ;Not found
MOV [FCB+RR],0 MOV [FCB+RR],0
MOV CX,512 MOV CX,512
MOV AH,RDBLK MOV AH,RDBLK
@@ -354,11 +355,11 @@ CLRDSK:
MOV DI,BX MOV DI,BX
MOV AX,0FFFFH MOV AX,0FFFFH
STOW STOW
STOB ;Fill first 3 bytes with FF STOB ;Fill first 3 bytes with FF
INC AX ;AX = 0 INC AX ;AX = 0
SHR CX SHR CX
JNC DOFILL JNC DOFILL
STOB ;Odd byte STOB ;Odd byte
DOFILL: DOFILL:
REP REP
STOW STOW
@@ -378,7 +379,7 @@ COPY:
MOV SI,FCB+10H MOV SI,FCB+10H
MOV DI,DSTFCB MOV DI,DSTFCB
MOVB MOVB
CMP B,[SI]," " ;Has file name? CMP B,[SI]," " ;Has file name?
JNZ HASDSTNAM JNZ HASDSTNAM
MOV SI,FCB+1 MOV SI,FCB+1
HASDSTNAM: HASDSTNAM:
@@ -438,7 +439,7 @@ NOSPCE: DB "Insufficient disk space$"
FCBFIL: DB 11,"?" FCBFIL: DB 11,"?"
DB 0 DB 0
SPECDRV: DS 1 SPECDRV:DS 1
NUMREC: DS 2 NUMREC: DS 2
IDLEN: DS 1 IDLEN: DS 1
@@ -446,16 +447,19 @@ ID: DS 8
COM: DB "COM" COM: DB "COM"
DSTFCB: DS 36 DSTFCB: DS 36
LINBUF: DB 80H,1,13 LINBUF:
DB 80H,1,13
DS 80H DS 80H
FILIFO: DB 8," " FILIFO:
DB 8," "
DB 0 DB 0
DB 12," ",4,0 DB 12," ",4,0
DB 12," ",8,0 DB 12," ",8,0
DB 0 DB 0
COMTAB: DB 4,"DIR" COMTAB:
DB 4,"DIR"
DW DIR DW DIR
DB 7,"RENAME" DB 7,"RENAME"
DW RENAME DW RENAME
@@ -472,4 +476,4 @@ COMTAB: DB 4,"DIR"
DB 0 DB 0
TPA: TPA:
 
View File
+22 -25
View File
@@ -1,18 +1,18 @@
FCB EQU 5CH FCB: EQU 5CH
RENAM EQU 23 RENAM: EQU 23
OPEN EQU 15 OPEN: EQU 15
CLOSE EQU 16 CLOSE: EQU 16
MAKE EQU 22 MAKE: EQU 22
DELFIL EQU 19 DELFIL: EQU 19
RDBLK EQU 39 RDBLK: EQU 39
WRBLK EQU 40 WRBLK: EQU 40
SETDMA EQU 26 SETDMA: EQU 26
PRINTBUF EQU 9 PRINTBUF:EQU 9
OUTCH EQU 2 OUTCH: EQU 2
INBUF EQU 10 INBUF: EQU 10
RR EQU 33 RR: EQU 33
PROMPT EQU "*" PROMPT: EQU "*"
ORG 100H ORG 100H
PUT 100H PUT 100H
@@ -198,15 +198,12 @@ MAXLIN:
RET RET
COMTAB DB "SFDLIE",13 COMTAB: DB "SFDLIE",13
NUMCOM EQU $-COMTAB NUMCOM: EQU $-COMTAB
;-----------------------------------------------------------------------; TABLE:
; Carefull changing the order of the next two tables. They are DW NOCOM ;No command--edit line
; linked and chnges should be be to both.
TABLE DW NOCOM ;No command--edit line
DW ENDED DW ENDED
DW INSERT DW INSERT
DW LIST DW LIST
@@ -668,14 +665,14 @@ PARAM2: DS 2
QFLG: DS 1 QFLG: DS 1
HAVEOF: DS 1 HAVEOF: DS 1
OLDLEN: DS 1 OLDLEN: DS 1
CURRENT: DS 2 CURRENT:DS 2
POINTER: DS 2 POINTER:DS 2
LAST: DS 2 LAST: DS 2
ENDTXT: DS 2 ENDTXT: DS 2
COMBUF: DS 2+128 COMBUF: DS 2+128
EDITBUF: DS 2+255 EDITBUF:DS 2+255
DS 40 DS 40
ALIGN ALIGN
STACK: STACK:
START: START:
 
View File
+23 -23
View File
@@ -1,14 +1,14 @@
FCB EQU 5CH FCB: EQU 5CH
FCB2 EQU 6CH FCB2: EQU 6CH
OPEN EQU 15 OPEN: EQU 15
CLOSE EQU 16 CLOSE: EQU 16
MAKE EQU 22 MAKE: EQU 22
DELETE EQU 19 DELETE: EQU 19
SEQWRT EQU 21 SEQWRT: EQU 21
SETDMA EQU 26 SETDMA: EQU 26
GETDRV EQU 25 GETDRV: EQU 25
PRINTBUF EQU 9 PRINTBUF:EQU 9
SYSTEM EQU 5 SYSTEM: EQU 5
ORG 100H ORG 100H
PUT 100H PUT 100H
@@ -217,17 +217,17 @@ DSTFCB: DS 32
DIRBUF: DS 128 DIRBUF: DS 128
SECBUF: DS 128 SECBUF: DS 128
SPT EQU 0 SPT: EQU 0
BLKSFT EQU 2 BLKSFT: EQU 2
BLKMSK EQU 3 BLKMSK: EQU 3
EXTMSK EQU 4 EXTMSK: EQU 4
DSISIZ EQU 5 DSISIZ: EQU 5
NUMENT EQU 7 NUMENT: EQU 7
ALBMP0 EQU 9 ALBMP0: EQU 9
ALBMP1 EQU 10 ALBMP1: EQU 10
DIRCKS EQU 11 DIRCKS: EQU 11
RESTRK EQU 13 RESTRK: EQU 13
XLTTBL EQU 15 XLTTBL: EQU 15
;Below is the definition for standard single-density 8" drives ;Below is the definition for standard single-density 8" drives
@@ -257,4 +257,4 @@ CPMTAB2:
DW 0,0,0,0 DW 0,0,0,0
DW 0,0,0,0 DW 0,0,0,0
DW 0,0,0,0 DW 0,0,0,0
 
+2 -2
View File
@@ -1,4 +1,4 @@
FCB EQU 5CH FCB: EQU 5CH
ORG 100H ORG 100H
PUT 100H PUT 100H
@@ -53,4 +53,4 @@ ERWRIT: DB "Disk write error$"
DRVBAD: DB "Bad drive specification" DRVBAD: DB "Bad drive specification"
END: END:
 
View File