Set direct page to device page
h3rald h3rald@h3rald.com
Thu, 11 Dec 2025 11:44:11 +0100
2 files changed,
4 insertions(+),
2 deletions(-)
M
examples/helloworld.xyw
→
examples/helloworld.xyw
@@ -4,7 +4,7 @@
; main program hello print JSRw ; terminate -$0 system.state STBw +$0 system.state STB ; a16 -- ; printing subroutine@@ -13,7 +13,7 @@ ; store top of stack to register XW
POPxw .label print.loop ; dereference address in XW and print - LDBxw console.output STBw + LDBxw console.output STB ; increment address, dereference ; go back to loop unless zero INCxw LDBxw print.loop JCNw
M
xywrun.c
→
xywrun.c
@@ -288,6 +288,8 @@ {
xyw_devices[i].init(xyw_devices[i].data); } } + // Set direct page to device page by default + xyw_memory[SYSTEM_PAGE] = 0xff; while (xyw_memory[SYSTEM_STATE] && *pc < SYSTEM_MEMORY_START) { xyw_dbg("PC: %04X -> %02X (%s) [U:%02X|S:%02X|X:%02X|Y:%02X|XW:%04X|YW:%04X]\n", *pc, xyw_memory[*pc], xyw_instructions[xyw_memory[*pc] & 0x1F], *u, *s, *x, *y, *xw, *yw);