all repos — xyw @ f44659e5a63340b60007dd9be9db0ab794e9c8a5

A minimal virtual machine and assembler for terminals.

Simplified hello world example.
h3rald h3rald@h3rald.com
Wed, 11 Feb 2026 17:47:28 +0100
commit

f44659e5a63340b60007dd9be9db0ab794e9c8a5

parent

9c362232dc125ebcfd7e1badd0421e89b2e6092b

1 files changed, 3 insertions(+), 5 deletions(-)

jump to
M examples/helloworld.xywexamples/helloworld.xyw

@@ -1,6 +1,3 @@

-; include device macros -.include "lib/macros.xyw" - ; main program hello print JSRw end JMPw

@@ -12,7 +9,8 @@ ; store top of stack to register XW

POPxw .label print.loop ; dereference address in XW and print - LDBxw PUTC + ; by setting the terminal output ($11) byte + LDBxw $11 STB ; increment address, dereference ; go back to loop unless zero INCxw LDBxw print.loop JCNw

@@ -20,5 +18,5 @@ RTS

; store null-terminated string .label hello -.string "Hello, World!\n" + .string "Hello, World!\n" .label end