From 85554b62a8467e95f09b90d5201a5f6bef91c70f Mon Sep 17 00:00:00 2001 From: d_m Date: Mon, 18 Dec 2023 23:16:44 -0500 Subject: [PATCH] more minimal detect.tal --- test/detect.tal | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/test/detect.tal b/test/detect.tal index 9bb92c6..45675f0 100644 --- a/test/detect.tal +++ b/test/detect.tal @@ -1,20 +1,13 @@ -|00 @System [ - &unused $2 &expansion $2 &wst $1 &rst $1 &metadata $2 - &red $2 &green $2 &blue $2 &debug $1 &state $1 ] +( detect.tal ) +( ) +( detects whether the emulator implements the uxn11 console. ) +( ) +( usage: uxncli detect.rom && echo yes || echo no ) -|10 @Console [ - &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 ] +|00 @System [ &unused $2 &expansion $2 &pad $b &state $1 ] |0100 ;query .System/expansion DEO2 - ;query/flags LDA2 #00ff EQU2 ?{ ;no !&done } ;yes - &done println #80 .System/state DEO BRK + ;query/flags LDA2 #00ff NEQ2 #80 ADD .System/state DEO BRK @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