Skip to content

Instantly share code, notes, and snippets.

@Ismael-VC
Created March 25, 2023 00:26
Show Gist options
  • Save Ismael-VC/ab2240ee1f77e7c799524ceff18d4f4e to your computer and use it in GitHub Desktop.
Save Ismael-VC/ab2240ee1f77e7c799524ceff18d4f4e to your computer and use it in GitHub Desktop.
Hello World in Uxntal.
%RTN { JMP2r }
%EMIT { #18 DEO }
%HALT { #010f DEO }
%\0 { 00 }
%\s { 20 }
%\n { 0a }
|0100 ( init )
;hello-word print-str
HALT
BRK
@print-str ( str* -- )
( Prints null terminated string )
&loop
( do ) LDAk EMIT
( while ) INC2 LDAk ?&loop
POP2
RTN
@hello-word "Hello \s "World! \n \0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment