diff --git a/gui/m291/src/m291.tal b/gui/m291/src/m291.tal index 4c09bbc..92c7a42 100644 --- a/gui/m291/src/m291.tal +++ b/gui/m291/src/m291.tal @@ -279,6 +279,7 @@ POP2 STH2r STH2r SWP2 OVR2 ADD2 SWP2 ( | print ) calc-width .secprog STZ2 + !message/ @@ -382,10 +383,9 @@ @str-lth ( a* b* -- a>b ) STH2 &>loop ( -- ) - LDAk LDAkr STHr SUBk ?&done - DUP2 #0000 EQU2 ?&done - POP2 INC2 INC2r !&>loop - &done NIP2 LTH POP2r JMP2r + LDAk LDAkr STHr SUBk ?{ + DUP2 #0000 EQU2 ?{ POP2 INC2 INC2r !&>loop } } + NIP2 LTH POP2r JMP2r @sort-folders ( -- ) .lines/folders LDZ ?{ JMP2r } @@ -412,13 +412,12 @@ POP2 POP2 DUP2 STH2r swap-tracks #0080 ADD2 !&>loop @swap-tracks ( src* dst* -- ) - EQU2k ?&skip - DUP2 ;tmp - OVR2 STH2 - - ;tmp STH2r - JMP2r - &skip POP2 POP2 JMP2r + EQU2k ?{ + DUP2 ;tmp + OVR2 STH2 + + ;tmp STH2r ! } + POP2 POP2 JMP2r @count-lines ( -- lines ) .lines/folders LDZ .lines/tracks LDZ ADD JMP2r @@ -584,10 +583,23 @@ ! +@ ( -- ) + ;id3/title get-uf2-width #00d0 LTH2 ?{ + [ LIT2 &f $2 ] INC2k ,&f STR2 + DUP #0f AND ?{ + #0020 .Screen/y DEO2 + + #0008 .Screen/x DEO2 + #0020 .Screen/y DEO2 + #04 SFT2 ;id3/title llen DIV2k MUL2 SUB2 ;id3/title ADD2 #01 ! } + POP2 } + JMP2r + @ ( -- ) ( | clear ) #0020 .Screen/y DEO2 + #0000 ;/f STA2 ( | draw ) #0020 .Screen/y DEO2 ;id3/title get-uf2-width #00d0 LTH2 ?{