more minimal detect.tal
This commit is contained in:
parent
89f9a978fc
commit
85554b62a8
|
@ -1,20 +1,13 @@
|
||||||
|00 @System [
|
( detect.tal )
|
||||||
&unused $2 &expansion $2 &wst $1 &rst $1 &metadata $2
|
( )
|
||||||
&red $2 &green $2 &blue $2 &debug $1 &state $1 ]
|
( detects whether the emulator implements the uxn11 console. )
|
||||||
|
( )
|
||||||
|
( usage: uxncli detect.rom && echo yes || echo no )
|
||||||
|
|
||||||
|10 @Console [
|
|00 @System [ &unused $2 &expansion $2 &pad $b &state $1 ]
|
||||||
&vect $2 &stdin $1 &pad1 $1 &proc-get $1 &host-get $1 &pad2 $1 &type $1
|
|
||||||
&stdout $1 &stderr $1 &proc-put $1 &pad3 $1 ¶m $2 &opts $1 &host-put $1 ]
|
|
||||||
|
|
||||||
|0100
|
|0100
|
||||||
;query .System/expansion DEO2
|
;query .System/expansion DEO2
|
||||||
;query/flags LDA2 #00ff EQU2 ?{ ;no !&done } ;yes
|
;query/flags LDA2 #00ff NEQ2 #80 ADD .System/state DEO BRK
|
||||||
&done println #80 .System/state DEO BRK
|
|
||||||
|
|
||||||
@query 03 10 ( uuid ) 0123 1250 d878 4462 bc41 d092 7645 a2fa &flags 0000
|
@query 03 10 ( uuid ) 0123 1250 d878 4462 bc41 d092 7645 a2fa &flags 0000
|
||||||
|
|
||||||
@yes "ok: 20 "uxn11 20 "console 20 "detected 0a 00
|
|
||||||
@no "FAIL: 20 "uxn11 20 "console 20 "NOT 20 "detected 0a 00
|
|
||||||
|
|
||||||
@println ( s* -> )
|
|
||||||
&loop LDAk ?{ POP2 JMP2r } LDAk .Console/stdout DEO INC2 !&loop
|
|
||||||
|
|
Loading…
Reference in New Issue