Seth Kushniryk

MS-DOS 2.0 on the Apple IIe

2026/03/12

I’ve been porting MS-DOS 2.0 to the Apple IIe using the AD8088 Plus coprocessor card. It’s an 8088 CPU on an expansion card with its own RAM and ROM. The card shipped with CP/M-86, available from nanja.info. The original ALF advertising materials suggest there may have been an MS-DOS port at some point (they write about it in future tense, so I don’t know if it ever actually happened), but the original OS disks aren’t shared to any of the usual places. I decided to start my own port because I like directories and object-oriented Turbo Pascal, neither of which CP/M-86 supports. Today I got it to boot.

The AD8088 Plus card

The card has 64KB on-board RAM at 00000-0FFFF, another 64KB at 20000-2FFFF, 512KB at 40000-BFFFF, and a 256KB ROM at C0000-FFFFF (only 4KB of which is used by the firmware). The Apple II’s main memory is visible to the 8088 at 10000-1FFFF, and the two processors talk through a shared memory protocol: the 8088 writes a command byte, signals the Apple II through an I/O port, and waits.

I’m using the original MS-DOS 2.0 OEM Adaptation Kit along with the sources published by the Computer History Museum. MS-DOS 2.0 has a pretty clean OEM layer. Microsoft provided the kernel, COMMAND.COM, and a skeleton BIOS template. The OEM writes IO.SYS with device drivers for the hardware. I needed a console driver (CON), a clock driver (CLOCK$) that reads ProDOS time, and a block device driver (DSK) for disk I/O. I also wrote a 6502 bridge program that runs on the Apple II side, handling all the actual disk and console operations on behalf of the 8088. The bridge is about 2.8KB of ca65 assembly.

The BIOS is assembled with the original MASM 1.10 from the OEM Adaptation Kit, running under FreeDOS in a headless QEMU instance. The build is automated with a Python script.

MS-DOS boot sequence

The Apple II bridge loads IO.SYS and MSDOS.SYS into 8088 RAM, then hands off to the 8088. The BIOS reads the BPB from the disk image’s boot sector, SYSINIT prints the copyright, COMMAND.COM loads and prompts for the date and time.

Date/time prompt and A> prompt

The disk driver reads sectors from a 4MB FAT12 image stored as a ProDOS file on the Apple IIe’s hard drive. The bridge translates sector numbers into file offsets and reads through the ProDOS MLI.

DIR listing

The Apple IIe has an 80-column card, and it only took one extra call in the bridge init to activate it:

80-column mode

One bug I spent a while tracking down: after printing “Command v. 2.02”, the system would spew repeating binary garbage instead of a prompt. The disk driver’s multi-sector read routine was advancing the destination pointer incorrectly when the starting offset was non-zero. The second sector would overlap the first, corrupting the data. COMMAND.COM loads its transient portion at a non-zero offset within a segment, so it got garbled code every time. The fix was saving the pointer register after the block copy instead of recomputing it.

Plans

The clock still needs some work. ProDOS on my Apple IIe seems to encode the year differently than I expected, so the date is a few years off. The time is correct though.

I want to write some kind of ANSI.SYS driver and make the console driver much more robust. I’m also hoping to get a COM driver working with the Super Serial Card. It’ll probably be slow, but napkin math suggests I can at least get 9600 baud. Other drivers I want to implement are the ability to mount a ProDOS directory (similar to the old UMSDOS experience in Linux) to make file transfers easier, and eventually I’d like to get it talking to the Uthernet II somehow.

One thing I’m particularly excited to try is 22nice. I have a V20 in my AD8088 card, so it should be able to run CP/M-80 on MS-DOS on ProDOS.

There are some constraints. This will never run CGA/EGA/VGA graphical programs, and probably won’t ever run text programs that write directly to VRAM. It does have full access to the 6502 address space though, so it could in theory run MS-DOS programs with Apple II graphics. I’m pretty sure none exist yet.

I’m hoping to have something in a sharable state soon. Microsoft released MS-DOS 2.0 under the MIT license, so once I do a careful copyright sweep through the project I should be able to publish it. I’m hoping this might lead to more AD8088 clones because it’s a fun card, and much simpler than the PC Transporter. If you have an AD8088 card (especially the original ALF version) and want to help test, let me know.

Categories: Computer Retro Projects