Created
March 25, 2023 00:26
-
-
Save Ismael-VC/ab2240ee1f77e7c799524ceff18d4f4e to your computer and use it in GitHub Desktop.
Hello World in Uxntal.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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