BASIC-DOS

A PCjs Retro-Programming Project

BASIC-DOS is on Twitter Project maintained by jeffpar

BASIC-DOS on an IBM PC with a Single Session

The machine below is an IBM PC (Model 5150) with a 4.77Mhz 8088, 128K of memory, a Color Display, and two diskette drives. It boots the BASICDOS-360K-S80 diskette and runs a single 80-column session, with the BASIC samples (eg, DONKEY.BAS) in its SAMPLES directory.

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 .

Use the MEM command to display current memory usage.

This demo is also available on an IBM PC XT, an IBM PC AT, and a COMPAQ DeskPro 386.

The BASICDOS-360K-S80 diskette’s CONFIG.SYS doesn’t define any consoles, so BASIC-DOS creates a single 80-column, 25-row session, running COMMAND.COM, which runs HELLO.BAT to display a colorful greeting. Type HELP for a list of commands, DIR to list the files on the diskette, and PRIMES.BAS to run the BASIC version of PRIMES.

BASIC Samples

The diskette’s SAMPLES directory contains text copies of DONKEY.BAS and the other BASIC samples from the IBM PC DOS 1.00 diskette, and CONFIG.SYS sets PATH$ so that they can be run from any directory. To try one, type DONKEY, press the space bar to switch lanes, and press ESC to exit. When DONKEY ends, BASIC-DOS restores the original display mode. Then try CIRCLE, or the name of any other sample (type DIR SAMPLES to list them). Not all of them run yet, but the list is growing. See the DONKEY.BAS checklist in the Project Status for what was needed to run it.

The machines also have the PC DOS 1.00 diskette in drive B:, whose original copies of the samples are in the tokenized format that IBM BASIC saves; BASIC-DOS can load and run those, too (eg, B:DONKEY).

For comparison, MSBASIC (built from Microsoft’s GW-BASIC sources) is on the BASICDOS-360K-TESTS diskette, in its TESTS directory, so you can load that diskette in drive B:, type CD SAMPLES, and then B:\TESTS\MSBASIC CIRCLE, for example, to run the same program the conventional way, and then type SYSTEM to return to BASIC-DOS.

DONKEY.BAS, the game that Bill Gates and Neil Konzen wrote for the IBM PC in 1981, was the first BASIC sample from the PC DOS 1.00 diskette that BASIC-DOS was able to load and run to completion. BASIC-DOS doesn’t interpret BASIC at all: it compiles each program into native 8086 code before running it, and its graphics statements write directly to video memory, so it runs them with better overall performance than BASICA, GW-BASIC, and other more conventional BASIC interpreters (see Performance). BASIC programs are also just another kind of command, run directly from the DOS prompt, alongside COM, EXE, and BAT files.

CONFIG.SYS from the BASICDOS-360K-S80 Diskette

REM Demonstration of a single-session configuration
BUFFERS=4
SESSIONS=3
SHELL=COMMAND.COM PATH$="A:\;A:\BIN;A:\SAMPLES;A:\DEMOS":HELLO.BAT

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