feat: run the full QB45 EXAMPLES suite (23 programs) oracle-verified
Implements every language feature the classic QuickBASIC 4.5 example
programs (qbasicapps/QB45/EXAMPLES) exercise, verified pixel- and
byte-exact against QB.EXE /RUN under DOSBox (xdotool-driven key
scripts, DOSBox Ctrl-F5 captures as ground truth):
- Records: TYPE/END TYPE, fixed STRING*n fields, member access
(x.field), arrays of records, LEN(recvar) = record byte size
- Files: OPEN FOR BINARY/RANDOM with LEN=n and bare channel numbers,
FIELD, typed GET/PUT, SEEK statement/function, LOF, LOC, FREEFILE
(bare form too), INPUT$(n,#ch), DOS-absolute paths resolve against
the emulated drive root, INPUT$/GET/SEEK on text channels via lazy
byte handle
- Statements: EXIT FOR/DO/SUB/FUNCTION, STATIC procedures (SHARED
names resolve to module scope before static locals), LINE INPUT
"prompt",var, MID$ assignment, PRINT USING (numeric field width =
spec char count), NAME, KILL with DOS wildcards, SHELL "DIR > file"
(WHEREIS.BAS-compatible 8.3 listing), ERR error codes, COMMAND$,
INSTR, &H&/&O& long-suffixed literals, OPEN COM1 null-modem
- Graphics: WINDOW / WINDOW SCREEN (plain form is Cartesian),
graphics VIEW with border that survives plain CLS, PMAP, DRAW macro
language (U/D/L/R/E/F/G/H, M, B, N, C, S, TA, P), PALETTE /
PALETTE USING, CLS 0/1/2, full 5-slot LOCATE, LINE -STEP and
16-bit dash style, pattern-string PAINT, PRESET; CIRCLE under
WINDOW keeps y-radius visually round (mode aspect, not y-scale);
PUT under a Cartesian WINDOW anchors the region's logical top-left;
same-mode SCREEN page flips preserve video memory
- Input: ALT+letter reaches programs as CHR$(0)+BIOS scancode
(KeyboardQueue VK_ALT_BASE scheme)
Verified: BALLPSET, BALLXOR, BAR, CAL, CHECK, COLORS, CRLF, CUBE,
EDPAT, ENTAB, FILERR, FLPT, INDEX, MANDEL, PALETTE, PLOTTER,
QLBDUMP, SEARCH, SINEWAVE, STRTONUM, TERMINAL, TOKEN, WHEREIS —
screenshots match the oracle (many pixel-identical), file outputs
(CRLF TEST.BAK, ENTAB OUT.TXT, INDEX STOCK.DAT) byte-identical.
TERMINAL also hits "Device timeout" in DOSBox itself (no COM1) —
environment limit, not a program bug. 93/93 tests green.
Documentation/language/index.org updated with all new statements.
12 files changed: