Created
June 15, 2024 23:56
-
-
Save Ismael-VC/2e34569b59e2743622b84678ac088af4 to your computer and use it in GitHub Desktop.
Syntax experiment with 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
%PC { LITr 00 JSRr #0003 SUB2 } | |
%DBG { #010e DEO } | |
%function { } | |
%break { BRK } | |
%constant { } | |
%vector { } | |
%unless { } | |
%else { } | |
%end { } | |
%true { #01 } | |
%false { #00 } | |
%return { JMP2r } | |
constant |00 @FOO | |
|0100 vector @on-reset ( --> ) | |
foo | |
unless true ?{ | |
{ "This 20 "is 20 "false! 0a00 } STH2r <pstr> !&end } | |
else | |
{ "This 20 "is 20 "true! 0a00 } STH2r <pstr> | |
end | |
&end | |
DBG | |
break | |
end | |
function @foo ( -- ) | |
unless false ?{ | |
unless .FOO ?{ | |
PC | |
#2a18 DEO | |
#2a18 DEO | |
#2a18 DEO | |
!&end } | |
else | |
#2f19 DEO | |
end | |
&end } | |
end | |
return | |
end | |
function @<pstr> ( {str}* -- ) | |
LDAk #18 DEO | |
INC2 & LDAk ?<pstr> | |
POP2 return | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment