BASIC-DOS

A PCjs Retro-Programming Project

BASIC-DOS is on Twitter Project maintained by jeffpar

Preview

This is a preview of a perpetually unfinished product.

BASIC-DOS development started in 2020 with the goal of an initial roll-out by August 12, 2021, just in time for the 40th anniversary of the IBM PC. And a “preview release” of BASIC-DOS was completed by then, so in terms of demonstrating the potential of BASIC-DOS, that goal was more or less achieved. However, it also demonstrated the limits of what a single person, building a product from scratch one assembly-language instruction at a time, could realistically hope to accomplish.

Fast forward a few years, and the introduction of AI agents like Claude Code has dramatically changed what is possible. The BASIC-DOS operating system architecture hasn’t changed, but AI has made it possible to fill in lots of missing functionality, quickly resolve bugs, test compatibility and performance issues, improve documentation, and more.

This means that many of the limitations discussed in these preview pages have now been removed, but more remain. And there will always be more, because is any project ever truly finished?

Contents

  1. Introducing BASIC-DOS for the IBM PC
  2. BASIC Operations
  3. BASIC Files vs. Batch Files
  4. Pipes and Sessions
  5. Were Dual Monitors Ever This Cool?
  6. Performance

Introducing BASIC-DOS for the IBM PC

This is a “sneak peek” at BASIC-DOS, the first version of DOS that could have been created for the IBM PC, with the benefit of more time and incredible foresight.

The machine shown below is an IBM PC (Model 5150) with two floppy disk drives and a Color Graphics Adapter (CGA) connected to a Color Monitor, with 128K of RAM.

A BASIC-DOS boot diskette (BASICDOS-DISK1) has been loaded into drive A:. The boot sector loads IBMBIO.COM into memory, which in turn loads CONFIG.SYS and IBMDOS.COM. Like PC DOS, IBMBIO contains all the BASIC-DOS device drivers and IBMDOS contains all the Disk Operating System services. Finally, IBMDOS loads COMMAND.COM into memory, which provides the initial A> command prompt.

IBM PC, 128Kb RAM, Dual Floppy Drives, CGA

Color Display
Caps
Num
Scroll
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
Esc
1 !
2 @
3 #
4 $
5 %
6 ^
7 &
8 *
9 (
0 )
- _
= +
Back
-
Num
Scroll
Tab
Q
W
E
R
T
Y
U
I
O
P
[ {
] }
↵
7
↑ 8
9
Ctrl
A
S
D
F
G
H
J
K
L
; :
' "
` ~
← 4
5
→ 6
+
Shift
\ |
Z
X
C
V
B
N
M
, <
. >
/ ?
Shift
PrtSc
1
↓ 2
3
Alt
Space
Caps
Ins 0
Del .
Esc
Tab
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
Num
Scroll
1 !
2 @
3 #
4 $
5 %
6 ^
7 &
8 *
9 (
0 )
- _
= +
Back
-
+
Q
W
E
R
T
Y
U
I
O
P
[ {
] }
↵
7
↑ 8
9
A
S
D
F
G
H
J
K
L
; :
' "
` ~
← 4
5
→ 6
\ |
Z
X
C
V
B
N
M
, <
. >
/ ?
Shift
PrtSc
1
↓ 2
3
Ctrl
Shift
Alt
Space
Caps
Ins 0
Del .

All files are original BASIC-DOS production and test files, with the exception of SYMDEB (Microsoft’s Symbolic Debug Utility v4.00) and MSBASIC.EXE, which was built from Microsoft’s GW-BASIC open-source files, with a little help from OS/2 Museum. These two files are used for early testing and debugging only, and they will not be distributed with the finished BASIC-DOS product.

NOTE: All preview binaries shown here are release (non-DEBUG) versions. DEBUG versions, which enable all run-time assertions, are also available by building BASIC-DOS with “mk.sh debug”; their file sizes and memory usage are larger, and their overall performance is slightly lower. Either way, BASIC-DOS outperforms PC DOS in several respects. More on that later.

PC DOS Compatibility

Like PC DOS, BASIC-DOS supports a FAT file system, COM and EXE executable formats, and many of the same PC DOS APIs, commands, and data structures, including Program Segment Prefixes (PSPs) and File Control Blocks (FCBs).

However, compatibility is not the primary goal of BASIC-DOS. The true goal is to demonstrate what could have been achieved as the first IBM PC operating system, not to create a “clone” of PC DOS and endlessly chase compatibility problems. To whatever extent BASIC-DOS is compatible with PC DOS, that compatibility is born purely out of convenience, relying on existing designs whenever it makes sense to do so – just as PC DOS and its predecessors relied on CP/M designs, CP/M relied on DEC designs, and so on.

In some ways, BASIC-DOS is more primitive than PC DOS 1.00. File system functions are read-only (files cannot be created, written, renamed, or deleted), and FCB functionality is limited. However, those are temporary limitations that will be addressed in the coming months.

In other ways, BASIC-DOS leap-frogs PC DOS 1.00, by adding the ability to read PC DOS 2.00-formatted diskettes, load PC DOS 2.00-style device drivers, perform handle-based I/O, support pipe and redirection operations, and last but not least, preemptive multitasking of multiple DOS applications across multiple screens or portions of a single screen.

And, true to its name, BASIC-DOS has begun incorporating BASIC language functionality into the command interpreter. COMMAND.COM is on its way to becoming a unified DOS and BASIC command interpreter.

Next: Part 2: BASIC Operations

Copyright (c) 2020-2026 Jeff Parsons Released under MIT License