Fixed hello world

This commit is contained in:
neauoire 2021-05-13 08:47:18 -07:00
parent bceed46348
commit 8845a326d8
2 changed files with 14 additions and 22 deletions

View File

@ -34,19 +34,15 @@ Read more in the [Uxambly Guide](https://wiki.xxiivv.com/site/uxambly.html).
|0100 ( -> ) |0100 ( -> )
;hello-word ,print JSR ,hello-word
BRK
@print ( addr* -- )
&loop &loop
( send ) DUP2 LDA .Console/char DEO ( send ) LDRk .Console/char DEO
( incr ) #0001 ADD2 ( incr ) #01 ADD
( loop ) DUP2 LDA #00 NEQ ,&loop JCN ( loop ) DUP ,&loop JCN
POP2 POP
RTN BRK
@hello-word "hello 20 "World! @hello-word "hello 20 "World!
``` ```

View File

@ -10,18 +10,14 @@
|0100 ( -> ) |0100 ( -> )
,hello-word ,print JSR ,hello-word
&loop
( send ) LDRk .Console/char DEO
( incr ) #01 ADD
( loop ) DUP ,&loop JCN
POP
BRK BRK
@print ( addr* -- )
&loop
( send ) LDAk .Console/char DEO
( incr ) #0001 ADD2
( loop ) LDAk ,&loop JCN
POP2
RTN
@hello-word "hello 20 "World! @hello-word "hello 20 "World!