Created
March 12, 2024 15:19
-
-
Save Ismael-VC/fdb0a5fc5bef0e5e36e904ab74353222 to your computer and use it in GitHub Desktop.
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
( usage: uxncli terminal-cli.rom ) | |
|10 @Console &vector $2 &read $1 $5 &write $1 | |
|0a @enter | |
|100 | |
@on-reset ( -> ) | |
;on-console .Console/vector DEO2 | |
;prompt INC <print-str> | |
BRK | |
@on-console ( -> ) | |
.Console/read DEI | |
DUP .enter NEQ ?{ | |
;prompt <print-str> | |
POP BRK } | |
<emit> | |
BRK | |
@<emit> ( char -- ) .Console/write DEO JMP2r | |
@<print-str> ( str* -- ) | |
&while ( -- ) | |
LDAk <emit> | |
INC2 LDAk ?&while | |
POP2 JMP2r | |
@you-said 0a "echo> 20 $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment