59 lines
2.6 KiB
Markdown
59 lines
2.6 KiB
Markdown
# Roadmap
|
|
|
|
## The Big One
|
|
|
|
- **GW-BASIC 2026 Compiler** — ahead-of-time compilation of BASIC programs to
|
|
native executables. Because nothing says "premature optimization" like
|
|
compiling a language designed for an interpreter running on a 4.77 MHz 8088.
|
|
But we've come this far, so why not? Likely approach: translate the token
|
|
stream to C and lean on GCC/Clang for the heavy lifting.
|
|
|
|
## Completed
|
|
|
|
### Hardware I/O Simulator (v0.15.0)
|
|
|
|
Implemented in `portio.c` / `portio.h` following the `virmem.c` dispatch
|
|
pattern. Emulates 8253 PIT channel 2 (speaker frequency), PPI port B
|
|
(speaker on/off with continuous tone via PulseAudio), CGA mode/color
|
|
registers, game port (joystick stub), and COM1 serial (transmitter-ready
|
|
stub). Default: reads return 0xFF (floating bus), writes discarded.
|
|
|
|
Statements: `OUT`, `WAIT`, `MOTOR`. Functions: `INP()`, `STICK()`, `STRIG()`.
|
|
|
|
Also in v0.15.0: filled remaining statement/function gaps — `RESET`,
|
|
`ENVIRON`/`ENVIRON$`, `ERDEV`/`ERDEV$`, `IOCTL`/`IOCTL$`, `LCOPY`,
|
|
`DATE$`/`TIME$` assignment, `CALL`/`CALLS`, `COM`. All 144 defined
|
|
tokens are now handled (100% token coverage).
|
|
|
|
String space pool with compacting garbage collector (`strpool.c`),
|
|
replacing individual `malloc`/`free`. 32KB default pool, bump-pointer
|
|
allocation, compaction at statement boundaries. `FRE()` returns actual
|
|
free space; `CLEAR n` resizes the pool.
|
|
|
|
## Next Up
|
|
|
|
*(Looking for the next major feature — see IDE and Notebook Integration below.)*
|
|
|
|
## IDE and Notebook Integration
|
|
|
|
- **Jupyter kernel for GW-BASIC** — a Jupyter Notebook kernel that runs
|
|
GW-BASIC programs cell-by-cell, with rich output for `PRINT`, inline graphics
|
|
rendering for drawing commands, and interactive `INPUT` via notebook widgets.
|
|
Similar in spirit to [foxkernel](https://github.com/evvaletov/foxkernel).
|
|
- **JetBrains plugin (IntelliJ/CLion)** — full-featured language plugin with
|
|
syntax highlighting, code completion, line number navigation, run
|
|
configurations, debugger integration (breakpoints via `STOP`, variable
|
|
inspection), structure view (line number outline), and error annotations.
|
|
- **VS Code extension** — language extension providing syntax highlighting
|
|
(TextMate grammar), snippets, run/debug tasks, integrated terminal runner,
|
|
and Language Server Protocol support for diagnostics and hover info.
|
|
|
|
## Known Limitations
|
|
|
|
- Maximum 256 variables, 64 arrays, 16 FOR nesting, 24 GOSUB nesting,
|
|
16 WHILE nesting
|
|
- `CALL`/`CALLS` (machine code execution) raises Illegal function call
|
|
- `DATE$`/`TIME$` assignment accepted but does not modify the system clock
|
|
- Device stubs (`ERDEV`, `IOCTL`, `COM`, `LCOPY`) return defaults — no real
|
|
device emulation
|