BASIC-DOS

A PCjs Retro-Programming Project

BASIC-DOS is on Twitter Project maintained by jeffpar

Build Machine

This IBM PC XT from PCjs Machines serves as both a BASIC-DOS build machine and test machine. It’s also been configured to run several times faster than a normal 4.77Mhz IBM PC, in order to improve build time – there are limits to our desire to relive the original IBM PC experience.

Since BASIC-DOS is designed for the IBM PC, it doesn’t support hard disks, but it does have the ability to detect a hard disk and boot from it if you press Esc. This allows a machine to always have a BASIC-DOS diskette in drive A: without being forced to boot from it.

See the Build Notes below for more details. The Build Machine is also available with Dual Monitors.

IBM PC XT, 512Kb RAM, 10Mb Hard Disk, CGA, Debugger

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 .
PCjs Debugger
Speed:
Stopped
AX
0000
BX
0000
CX
0000
DX
0000
SP
0000
BP
0000
SI
0000
DI
0000
DS
0000
ES
0000
SS
0000
CS
0000
IP
0000
V
0
D
0
I
0
T
0
S
0
Z
0
A
0
P
0
C
0
SW1
1
2
3
4
5
6
7
8
256K, No FPU, Color Monitor, 2 Floppy Drives

BASIC-DOS Build Notes

The BASIC-DOS Build Machine contains two 10Mb hard disks:

To build BASIC-DOS, press Esc when the machine boots. The machine will load PC DOS 2.00 from drive C:, switch to drive D:, and run MK.BAT. The MK.BAT files use the Microsoft MAKE utility to do most of the work, but the batch files are also responsible for copying the built binaries to the BASIC-DOS diskette currently in drive A:.

If the batch files finish successfully, reboot the machine (press Ctrl-Alt-Del) and then press Enter instead of Esc at the BASIC-DOS boot prompt. You should now be running BASIC-DOS on the IBM PC XT, which BASIC-DOS treats as an IBM PC.

NOTE: The boot prompt appears only if BASIC-DOS detects a hard disk or the PCjs Debugger is present.

By default, the binaries contain DEBUG code (eg, assertions and debugging aids). To build non-debug binaries, type MK FINAL, or MKCLEAN FINAL if switching between DEBUG and FINAL binaries. The MKCLEAN.BAT batch file simply deletes all the binaries before running MK.BAT.

Developing with Visual Studio Code

Visual Studio Code has been the IDE of choice for all BASIC-DOS development. VS Code can’t build the source code directly, but it can start a web server running your own copy of the BASIC-DOS Build Machine. The BASIC-DOS repository includes a .vscode folder with a tasks.json that defines several tasks that should be configured to start when VS Code loads the BASIC-DOS project.

The first task (bundle serve) starts up the Jekyll web server. Make sure you’ve successfully run both npm install and bundle install in your local copy of the BASIC-DOS repository. Once your server is installed and running, verify you can access the BASIC-DOS Build Machine at http://localhost:4040/build/.

The second task (gulp watch) starts a file-watcher task that rebuilds the BASIC-DOS source disk image whenever a BASIC-DOS source file has been changed locally (eg, by the VS Code editor).

Note that this task also requires the PCjs DiskImage utility, so you should clone the PCjs repository, run the usual npm install, and then set the environment variable PCJS to the fully-qualified name of the directory containing the clone. Then verify that diskimage works; eg:

node $PCJS/tools/modules/diskimage.js

DiskImage v2.04
Copyright © 2012-2020 Jeff Parsons <Jeff@pcjs.org>

nothing to do

Every time the BASIC-DOS gulp watch task builds a new disk image, the Jekyll web server should automatically detect the change and rebuild the web site (on macOS, that entire process takes only a few seconds). When that’s done, refresh your web browser to reload the BASIC-DOS Build Machine, press Esc, and let the MK command rebuild any BASIC-DOS binaries that are out-of-date.

If you then want to copy the binaries from the Build Machine back to your local file system, click the machine’s Save HD1 button, be sure to tell your browser you really want to download and keep BDSRC.img, and then use the PCjs diskimage utility to extract files from the virtual hard disk; eg:

node $PCJS/tools/modules/diskimage.js BDSRC.img --extract --overwrite
cp -pR BDSRC/* $BASICDOS/software/pcx86/bdsrc/

Be very careful when using commands like those shown above. It’s easy to lose your work if it turns out the Build Machine’s disk image was stale (eg, the file watcher didn’t actually run, or the web server didn’t actually rebuild the site with a new disk image, or you didn’t actually refresh your web browser).

Whew, that’s a lot of “actuallies.”

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