Last active
April 3, 2023 05:26
-
-
Save Ismael-VC/b3d60add9ae31247ad0f2324db79651d to your computer and use it in GitHub Desktop.
Uxntal for and while loops
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
;list print-digits | |
BRK | |
@print-digits ( list* -- ) | |
LDA2k SWP2 INC2 INC2 | |
&loop | |
LDAk LIT "0 ADD #18 DEO | |
INC2 GTH2k ?&loop | |
POP2 POP2 | |
#0a18 DEO | |
JMP2r | |
@list =&end [ 00 01 02 03 04 05 06 07 08 09 ] &end |
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
;list print-digits | |
BRK | |
@print-digits ( list* -- ) | |
&loop | |
LDAk LIT "0 ADD #18 DEO | |
INC2 LDAk ?&loop | |
POP2 | |
#0a18 DEO | |
JMP2r | |
@list [ 00 01 02 03 04 05 06 07 08 09 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment