CI: fix dos-cross-compile env; codegen: accept concat in CVI/CVS/CVD/cmp
- .github/workflows/ci.yml: the dos-cross-compile job failed on the first push because build_dos.sh sources $HOME/openwatcom-v2/setvars.sh if WATCOM is unset, but that file isn't part of the OpenWatcom V2 snapshot — I'd been creating it locally by hand. Add a "Configure OpenWatcom env" step that generates setvars.sh after extraction (so build_dos.sh works) AND exports WATCOM/PATH/INCLUDE via $GITHUB_ENV (so subsequent steps work even if setvars.sh sourcing changes). Also stash both DOS binaries before the next-mode clean wipes them, so the artifact upload actually has both .exe files. - src/codegen.c: switch the four remaining emit_str_atom callers (CVI/CVS/CVD function args + string-comparison left/right) to emit_str_expr. Now `CVS(A$+B$)` and `A$+B$ < C$` accept concatenation in their string operands; previously the atom-level caller stopped at the first identifier and the trailing `+` confused downstream parsing. Verified: CVS(MKS$(3.14)+MKS$(0)) round-trips to 3.14 in both interpreter and compiled binary. All 72 interpreter + 63 compiler tests still pass. - docs/getting-started.md: document that gwbasic-compile auto-numbers unnumbered direct-mode lines (last_num + 10) so scratchpad-style programs compile without manual renumbering. - tests/run_freedos_qemu.sh: helper for going through the manual TUI checklist on bare FreeDOS. Modern qemu-kvm doesn't expose -fda on the default machine type and fat:rw: protocol is gone, so a fully automated FreeDOS smoke isn't tractable from userspace; this script builds a FAT data image (mtools), attaches it as -hdb to the FreeDOS qcow2, and points the user at the manual sequence in the script header. The DOSBox-X harness (run_dos_smoke.sh) remains the automated DOS smoke.
This commit is contained in:
@@ -102,6 +102,12 @@ build/gwbasic-compile program.bas
|
||||
build/gwbasic-compile -c --runtime . program.bas
|
||||
```
|
||||
|
||||
Both numbered (`10 PRINT "HI"`) and unnumbered (`PRINT "HI"`) sources
|
||||
compile. Unnumbered lines get auto-assigned numbers (10, 20, 30, ...) so
|
||||
the analysis pass and codegen can produce labeled statements; explicit
|
||||
line numbers are preserved. Direct-mode scratchpad scripts and classic
|
||||
"just a list of statements" programs compile without manual renumbering.
|
||||
|
||||
### Compiler Options
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user