26 lines
527 B
Plaintext
26 lines
527 B
Plaintext
( hello world, to console )
|
|
|
|
:dev/w fff9 ( const write port )
|
|
;i 1 ( var iterator )
|
|
|
|
|0100 @RESET
|
|
|
|
#00 ,dev/w STR ( set dev/write to console )
|
|
|
|
@word1 "hello_world ( len: 0x0b )
|
|
|
|
@loop
|
|
IOW ( write to device#0 )
|
|
,i LDR #01 ADD ,i STR ( increment itr )
|
|
,i LDR ( a = i )
|
|
,word1 ,strlen JSR ( b = string length )
|
|
NEQ ,loop ROT JSR? POP^ ( a != b ? loop )
|
|
|
|
BRK
|
|
|
|
@strlen #0001 ADD2 LDR RTS
|
|
|
|
|c000 @FRAME BRK
|
|
|d000 @ERROR BRK
|
|
|FFFA .RESET .FRAME .ERROR
|