Files
gw-basic-2026/tests/programs/peek_gfx.bas
Eremey Valetov 4551c88a50 Implement BSAVE/BLOAD, TUI color, extended PEEK/POKE, update to v0.12.0
BSAVE/BLOAD: save and load virtual memory blocks with 0xFD-header
binary format, operating on the current DEF SEG segment.

TUI color: tui_refresh emits ANSI SGR codes from cell attributes;
COLOR statement sets tui.current_attr when TUI is active.

Extended PEEK/POKE: CGA graphics framebuffer (interlaced layout) via
gfx_cga_peek/poke routed through virmem when gfx_active(); BIOS
keyboard shift flags (offset 0x17 bit 7 = insert mode).

Add bibliography to language reference. 64 tests, all passing.
2026-03-01 13:37:05 -05:00

18 lines
424 B
QBasic

10 REM Test CGA graphics framebuffer PEEK/POKE
20 SCREEN 1
30 DEF SEG = &HB800
40 REM POKE a byte at offset 0 (even row 0, first 4 pixels)
50 POKE 0, &HFF
60 V = PEEK(0)
70 PRINT "POKE FF PEEK="; V
80 REM POKE at odd row bank (offset 0x2000)
90 POKE &H2000, &HAA
100 V = PEEK(&H2000)
110 PRINT "ODD ROW PEEK="; V
120 REM Clear and verify
130 POKE 0, 0
140 PRINT "CLEARED="; PEEK(0)
150 SCREEN 0
160 DEF SEG
170 PRINT "DONE"