| ... | ... |
@@ -2,8 +2,6 @@ |
| 2 | 2 |
|
| 3 | 3 |
%HALT { #010f DEO }
|
| 4 | 4 |
%EMIT { #18 DEO }
|
| 5 |
-%DEBUG { ;print-hex/byte JSR2 #0a EMIT }
|
|
| 6 |
-%DEBUG2 { ;print-hex JSR2 #0a EMIT }
|
|
| 7 | 5 |
|
| 8 | 6 |
( init ) |
| 9 | 7 |
|
| ... | ... |
@@ -12,27 +10,10 @@ |
| 12 | 10 |
;hello-word |
| 13 | 11 |
&while |
| 14 | 12 |
( send ) LDAk EMIT |
| 15 |
- #20 EMIT |
|
| 16 |
- DUP2 ;print-hex JSR2 |
|
| 17 |
- #20 EMIT |
|
| 18 |
- LDAk ;print-hex/byte JSR2 |
|
| 19 |
- #0a EMIT |
|
| 20 | 13 |
INC2 LDAk ,&while JCN |
| 21 | 14 |
POP2 |
| 22 | 15 |
( stop ) HALT |
| 23 | 16 |
|
| 24 | 17 |
BRK |
| 25 | 18 |
|
| 26 |
-@print-hex ( value* -- ) |
|
| 27 |
- |
|
| 28 |
- SWP ,&byte JSR |
|
| 29 |
- &byte ( byte -- ) |
|
| 30 |
- STHk #04 SFT ,&parse JSR #18 DEO |
|
| 31 |
- STHr #0f AND ,&parse JSR #18 DEO |
|
| 32 |
- JMP2r |
|
| 33 |
- &parse ( byte -- char ) DUP #09 GTH ,&above JCN #30 ADD JMP2r |
|
| 34 |
- &above #57 ADD JMP2r |
|
| 35 |
- |
|
| 36 |
-JMP2r |
|
| 37 |
- |
|
| 38 |
-@hello-word "Hello 20 "Uxn! |
|
| 39 | 19 |
\ No newline at end of file |
| 20 |
+@hello-word "Hello 20 "Uxn! $1 |
|
| 40 | 21 |
\ No newline at end of file |