BASIC-DOS

A PCjs Retro-Programming Project

BASIC-DOS is on Twitter Project maintained by jeffpar

Preview

Part 2: BASIC Operations

The machine below boots the BASICDOS-360K-S80 diskette, changes to its DEMOS directory, lists the PRIMES files there, and then runs PRIMES.BAS with MSBASIC (from the BASICDOS-360K-TESTS diskette in drive B:), which computes all the primes under 1000 on a 4.77Mhz IBM PC.

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 .

PRIMES.BAS was the first BASIC program written to run in both BASIC-DOS and MSBASIC, so the machine above runs it with MSBASIC first. After it prints:

TOTAL PRIMES < 1000:  168

type SYSTEM to return to the BASIC-DOS prompt.

Next, type PRIMES.BAS to load and run the same program with BASIC-DOS.

Notice how much faster BASIC-DOS execution is, because BASIC-DOS compiles each program into 8086 code before running it. And BASIC-DOS is performing full 32-bit integer operations (MSBASIC integer operations are only 16-bit).

PRIMES.BAS needs only integers, but BASIC-DOS also supports IEEE double-precision floating-point (with or without an 8087), strings, arrays, file I/O, graphics, and sound; see the BASIC-DOS Manual for the full list of commands and functions, and Part 6 for benchmarks.

Next: Part 3: BASIC Files vs. Batch Files

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