2021-03-27 18:04:05 +00:00
|
|
|
( hello world )
|
|
|
|
|
|
|
|
%RTN { JMP2r }
|
|
|
|
|
|
|
|
( devices )
|
|
|
|
|
2021-04-07 04:34:11 +00:00
|
|
|
|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
|
2021-04-17 20:36:36 +00:00
|
|
|
|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 string 2 }
|
2021-03-27 18:04:05 +00:00
|
|
|
|
|
|
|
( program )
|
|
|
|
|
2021-04-07 04:34:11 +00:00
|
|
|
|0200
|
2021-03-27 18:04:05 +00:00
|
|
|
|
|
|
|
( for loop )
|
|
|
|
#00 #0d
|
|
|
|
$loop
|
|
|
|
( body )
|
|
|
|
SWP #01 ADD SWP
|
|
|
|
DUP2 LTH ^$loop JNZ
|
|
|
|
POP2
|
|
|
|
|
|
|
|
( while )
|
|
|
|
#00 #0d
|
|
|
|
$while
|
|
|
|
( body )
|
|
|
|
DUP2 EQU ^$end JNZ
|
|
|
|
SWP #01 ADD SWP
|
|
|
|
^$while JMP $end
|
|
|
|
POP2
|
|
|
|
|
|
|
|
( switch )
|
|
|
|
#02
|
|
|
|
DUP #01 NEQ ^$b JNZ
|
|
|
|
( a )
|
|
|
|
$b DUP #02 NEQ ^$c JNZ
|
|
|
|
( b )
|
|
|
|
$c DUP #03 NEQ ^$default JNZ
|
|
|
|
( c )
|
|
|
|
$default
|
|
|
|
POP
|
|
|
|
|
|
|
|
BRK
|