2021-02-10 22:05:40 -05:00
|
|
|
( hello world, to console )
|
2021-02-06 13:39:13 -05:00
|
|
|
|
2021-02-10 22:05:40 -05:00
|
|
|
:dev/w fff9 ( const write port )
|
|
|
|
;i 1 ( var iterator )
|
2021-02-06 13:39:13 -05:00
|
|
|
|
|
|
|
|0100 @RESET
|
|
|
|
|
2021-02-10 22:05:40 -05:00
|
|
|
,00 ,dev/w STR ( set dev/write to console )
|
2021-02-06 13:39:13 -05:00
|
|
|
|
2021-02-10 22:05:40 -05:00
|
|
|
@word1 "hello_world ( len: 0x0b )
|
2021-02-06 13:39:13 -05:00
|
|
|
|
2021-02-10 22:05:40 -05:00
|
|
|
@loop
|
|
|
|
IOW ( write to device#0 )
|
|
|
|
,incr JSR ( increment itr )
|
|
|
|
,i LDR ( a = i )
|
|
|
|
,word1 ,strlen JSR ( b = string length )
|
|
|
|
NEQ ,loop ROT JSR? ( a != b ? loop )
|
2021-02-06 13:39:13 -05:00
|
|
|
|
2021-02-10 22:05:40 -05:00
|
|
|
BRK
|
2021-02-06 13:39:13 -05:00
|
|
|
|
2021-02-10 22:05:40 -05:00
|
|
|
@strlen ,0001 ADD^ LDR RTS
|
|
|
|
@incr ,i LDR ,01 ADD ,i STR RTS
|
2021-02-06 13:39:13 -05:00
|
|
|
|
|
|
|
|c000 @FRAME BRK
|
|
|
|
|d000 @ERROR BRK
|
|
|
|
|FFFA .RESET .FRAME .ERROR
|