Prepare for FreeDOS package submission

- Add CHANGES.TXT with full version history (DOS-friendly format)
- Add DOS/FreeDOS section to README.md
- Move compiler memory safety and DOS target to Completed in roadmap
- Add hal_dos.c to architecture.md module map
- Add .tab-color to .gitignore
This commit is contained in:
Eremey Valetov
2026-04-10 18:14:41 -04:00
parent 54e5ecd6ec
commit 981aeabc45
5 changed files with 114 additions and 9 deletions

1
.gitignore vendored
View File

@@ -6,6 +6,7 @@ docs/_build/
*.exe
*.err
*.lib
.tab-color
gwbasic_*.txt
gwbasic_*.dat
gwbasic_*.bas

77
CHANGES.TXT Normal file
View File

@@ -0,0 +1,77 @@
GW-BASIC 2026 -- Change History
================================
v0.17.0
- Compiler memory safety: --warn (static analysis), --safe (checked
integer arithmetic, enhanced array/GOSUB diagnostics), --safe=sanitize
- 16-bit real-mode DOS target (Makefile.dos16): 128KB standalone MZ
executable, no DOS extender required, far-heap TUI screen buffer
- 32-bit DOS/4GW target (Makefile.dos): 175KB LE executable
- Tested on FreeDOS 1.4
v0.16.0
- AOT compiler: 69/69 tests pass (100%)
- CHAIN/COMMON/RUN "file" via runtime delegation
- Token embedding, string comparison, division-by-zero detection
- Compiler optimizations: constant folding, dead code elimination,
FOR step=1 elision, fast-path expressions, selective variable sync
- Cross-compile to DOS with OpenWatcom (24/24 files)
v0.15.0
- Hardware I/O simulator (8253 PIT, PPI speaker, CGA, game port)
- 100% token coverage (all 144 GW-BASIC tokens)
- String space pool with compacting garbage collector
- Jupyter notebook kernel (Sixel graphics, INPUT, Pygments)
v0.14.0
- MBF binary file compatibility (IEEE<->MBF at save/load boundary)
- Fix binary loader null-byte truncation
- DRAW M/S/A bug fixes, TA/=var;/X substring support
v0.13.0
- VIEW/WINDOW/PALETTE graphics, PMAP function
- MBF float format for CVS/CVD/MKS$/MKD$
v0.12.0
- BSAVE/BLOAD, TUI ANSI 16-color rendering
- CGA graphics framebuffer PEEK/POKE, keyboard shift flags
v0.11.0
- DEF SEG / PEEK / POKE virtual memory
- GET/PUT graphics sprites, PRINT USING fixes
v0.10.0
- Binary tokenized SAVE/LOAD, INKEY$ extended keys
- Golden-file regression tests, classic BASIC programs
v0.9.0
- EDIT statement, ON TIMER/ON KEY event trapping
- F-key escape parser fixes
v0.8.0
- Dynamic TUI screen buffer, --full flag
- LPRINT/LLIST with --lpt
v0.7.0
- AUTO, RENUM (with GOTO/GOSUB patching), DELETE, COMMON
v0.6.0
- DATE$/TIME$/TIMER, FILES, SHELL, CHDIR, MKDIR, RMDIR
v0.5.0
- Full-screen TUI editor, KEY statement, Ctrl+Break
- Sixel graphics, SOUND/BEEP/PLAY
v0.4.0
- CHAIN, RUN "file", random-access I/O (FIELD/PUT/GET)
- CVI/CVS/CVD/MKI$/MKS$/MKD$
v0.3.0
- File I/O, PRINT USING, SAVE/LOAD, MID$ assignment
- Graphics stubs
v0.2.0
- Variables, arrays, program storage, control flow
v0.1.0
- Expression calculator with direct mode

View File

@@ -116,6 +116,18 @@ bash tests/run_tests.sh # interpreter
python -m gwbasickernel.test_kernel # Jupyter kernel
```
## DOS / FreeDOS
Cross-compiles to DOS with OpenWatcom V2:
```bash
wmake -f Makefile.dos16 # 16-bit real-mode (128KB standalone, no extender)
wmake -f Makefile.dos # 32-bit DOS/4GW (175KB, requires DOS4GW.EXE)
```
The 16-bit build runs on FreeDOS, MS-DOS, and compatible systems without
a DOS extender. See [Getting Started](docs/getting-started.md) for details.
## Documentation
Full Sphinx documentation in `docs/`:

View File

@@ -54,7 +54,7 @@ HAL writes straight to stdout.
| AOT compiler analysis | `analysis.c` | -- |
| AOT compiler codegen | `codegen.c` | -- |
| Compiled program runtime | `gwrt.c` | -- |
| Platform abstraction | `hal_posix.c` | OEM*.ASM |
| Platform abstraction | `hal_posix.c`, `hal_dos.c` | OEM*.ASM |
## Source Layout

View File

@@ -64,17 +64,32 @@ model with sentinel protocol.
Install: `pip install -e . && gwbasickernel-install --user`
## Next Up
### Compiler Memory Safety (v0.17.0)
### Compiler Memory Safety (`--warn` / `--safe`)
- **`--warn`** -- static analysis warnings (uninitialized variables, GOTO to
nonexistent line, unreachable code, FOR/GOSUB nesting depth)
- **`--safe`** -- runtime safety checks in generated C: checked integer arithmetic
via `gw_int_add/sub/mul` (fixes int16_t overflow UB), enhanced array bounds
diagnostics with line numbers and variable names, GOSUB stack overflow
diagnostics, string pool GC pinning
`--warn`, `--safe`, and `--safe=sanitize` flags for the ahead-of-time compiler.
- **`--warn`** -- static analysis: uninitialized variables, GOTO to nonexistent
line, unreachable code detection. Zero runtime cost.
- **`--safe`** (implies `--warn`) -- checked integer arithmetic via
`gw_int_add/sub/mul/neg` (raises Overflow instead of wrapping), enhanced
array bounds diagnostics with variable names and line numbers, GOSUB stack
overflow diagnostics, ABS/SGN type-preserving codegen, string pool GC pinning
infrastructure
- **`--safe=sanitize`** -- above plus `-fsanitize=address,undefined` passed to gcc
### DOS / FreeDOS Target (v0.17.0)
Cross-compiles to DOS using OpenWatcom V2. Two targets:
- **16-bit real-mode** (`Makefile.dos16`): 128KB standalone MZ executable,
MEDIUM memory model, far-heap TUI screen buffer, no DOS extender required
- **32-bit DOS/4GW** (`Makefile.dos`): 175KB LE executable, flat memory model,
requires DOS4GW.EXE extender
Tested on FreeDOS 1.4 via QEMU.
## Next Up
### Compiler Optimization Flags
- **`--no-gc-check`** -- skip `gwrt_check_line()` per-line calls (no string pool
GC, no Ctrl+Break check) for maximum throughput