BASIC-DOS

A PCjs Retro-Programming Project

BASIC-DOS is on Twitter Project maintained by jeffpar

Preview

Part 2: BASIC Operations

At the moment, the set of available BASIC commands is very basic: CLS, COLOR, DEF, GOTO, IF … THEN, LET, and PRINT. But those are enough to write some simple programs. Numeric support is limited to integer constants, variables, and operators (no floating-point yet). String variables can be created and printed, but no string operations are available yet either.

PRIMES.BAS was the first BASIC program written to run in both BASIC-DOS and MSBASIC. It computes all primes under 1000.

Let’s watch it run on a 4.77Mhz IBM PC with MSBASIC first.

IBM PC, 64Kb 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 .

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. And BASIC-DOS is performing full 32-bit integer operations (MSBASIC integer operations are only 16-bit).

Next: Part 3: BASIC Files vs. Batch Files

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