all repos — xyw @ 4bec4241719d73c97b5a9e24dd4edfb2ec5e66b6

A minimal virtual machine and assembler for terminals.

Set direct page to device page
h3rald h3rald@h3rald.com
Thu, 11 Dec 2025 11:44:11 +0100
commit

4bec4241719d73c97b5a9e24dd4edfb2ec5e66b6

parent

f789e941e1f994ca076b6e14f1fafee9273850e2

2 files changed, 4 insertions(+), 2 deletions(-)

jump to
M examples/helloworld.xywexamples/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.cxywrun.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);