FreeDOS BW-BASIC: Numbered Programs, LIST/RUN, and ANSI BASIC Scope
Install the documented FreeDOS BW-BASIC package, exercise its numbered-line workflow, and interpret its qualified ANSI BASIC compatibility accurately.
FreeDOS documents Bywater BASIC (bwBASIC) as an interpreter that can be installed from its distribution media. It is useful for exploring numbered-line BASIC, but two boundaries matter: the package is not guaranteed to be present in every installation, and its stated ANSI compatibility is deliberately partial. This guide follows the FreeDOS Documentation Project’s FreeDOS 1.4 example and keeps claims within what that page demonstrates. If your installed package differs, its own version banner, BWBASIC.DOC, and HELP output are the authorities for that system.
Find and start the documented package
The FreeDOS tutorial places Bywater BASIC in the Development package group on the FreeDOS 1.4 Bonus CD. It gives the installed directory as \DEVEL\BWBASIC and starts the interpreter by changing to that directory and entering BWBASIC:
cd \devel\bwbasic
bwbasic
This is a path for the documented package layout, not a promise that every FreeDOS boot image or custom installation contains the directory. If the command is not found, first check whether the package was installed and whether the directory exists; do not treat a missing default-PATH entry as evidence that the interpreter is broken. Record the interpreter banner before comparing behavior. The FreeDOS page shows Bywater BASIC Interpreter version 3.30, but that identifies the page’s example, not every package available today.
The interpreter’s prompt is a good place to keep the first test small. The tutorial demonstrates entering a program one numbered line at a time, asking the built-in help system about FOR, inspecting the stored listing, and then running the program. HELP lists available online help, while HELP FOR displays the documented loop syntax. Consult the installed manual for features that are not shown in that tutorial rather than assuming that examples from another BASIC dialect apply unchanged.
Enter and inspect a numbered program
The official example prints five random values with a loop:
10 RANDOMIZE
20 FOR I = 1 TO 5
30 PRINT RND(1)
40 NEXT
After entering the lines, type LIST. In the documented run, BW-BASIC formats the stored program for display: it shows CALL RANDOMIZE on line 10 and indents the PRINT line inside the loop. That makes LIST useful as an inspection step before execution. Do not assume the displayed form is a byte-for-byte copy of your keystrokes; compare the interpreter’s listing and the installed manual when syntax or formatting matters.
Run the sample with RUN. The tutorial shows five values, then different values when it runs the program again because RANDOMIZE seeds the generator from a random starting point. This is appropriate for demonstrating the command flow, but it makes the output unsuitable as a fixed expected result in a repeatable test. For a deterministic lesson, use a different example whose expected output does not depend on random-number generation, or consult the matching manual for a supported seeding approach before relying on one.
When finished, the documented exit command is QUIT, which returns to the operating system. A complete first-session check is therefore: start the installed interpreter, request help for a statement you plan to use, enter a short numbered program, inspect it with LIST, execute it with RUN, and leave with QUIT. Each step checks a separate part of the workflow rather than treating a startup banner as proof that the sample behaves as intended.
Read the ANSI claim precisely
The FreeDOS documentation says Bywater BASIC implements “a large superset” of ANSI Minimal BASIC and “a significant subset” of ANSI Full BASIC. Those qualifiers matter. They do not claim complete conformance to either standard, nor do they establish compatibility with every vendor’s BASIC extensions. Treat the statement as a summary of language coverage, not as a substitute for a feature-by-feature compatibility check.
For a port, identify the specific statements and semantics the program uses, then test a small representative case in the installed BW-BASIC version. HELP and the local BWBASIC.DOC provide version-matched guidance; the FreeDOS tutorial itself demonstrates only a small selection, including FOR, PRINT, RND(1), RANDOMIZE, LIST, RUN, and QUIT. A successful sample confirms only those paths in that environment. It cannot prove full ANSI conformance or compatibility with another interpreter.
Keep the experiment reproducible
Write down the FreeDOS release, package source, and interpreter banner alongside a saved copy of the short program. Use LIST to record what the interpreter retained, and note whether RANDOMIZE was present when recording output. If another machine gives a different result, first compare versions, entered lines, and the documented behavior before attributing the difference to FreeDOS itself.
The FreeDOS tutorial was checked on 2026-10-16. Its package group, directory, version banner, and examples describe the documented FreeDOS 1.4/Bywater BASIC 3.30 path; newer or customized packages may differ. Recheck the installed manual and help output before applying the instructions to a different build.
Related:
- FreeDOS EDLIN: A Safe Line-Editing Workflow for Text-Only Recovery
- How to Set Up a Development Environment on FreeDOS
Sources: