From e53a86d98bff58b4a4cb23ffa021a83341c43c7e Mon Sep 17 00:00:00 2001 From: neauoire Date: Sat, 28 Oct 2023 20:39:23 -0700 Subject: [PATCH] (icnsix) Working copy --- gui/sixels/icnsix.tal | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/gui/sixels/icnsix.tal b/gui/sixels/icnsix.tal index 8868a12..6f3b990 100644 --- a/gui/sixels/icnsix.tal +++ b/gui/sixels/icnsix.tal @@ -46,15 +46,31 @@ STH2k #00 ;img/width LDA #30 SFT2 #0000 &w ( -- ) - DUP2 STH2kr get-pixel phex/b #2018 DEO - + ( DUP2 phex #2018 DEO + STH2kr phex #2018 DEO ) + DUP2 STH2kr get-sixel #18 DEO + ( #0a18 DEO ) INC2 GTH2k ?&w - POP2 POP2 - POP2r - INC2 GTH2k ?&v + POP2 POP2 POP2r + [ LIT "- ] #18 DEO + #0006 ADD2 GTH2k ?&v POP2 POP2 JMP2r +@get-sixel ( x* y* -- byte ) + + SWP2 ,&x STR2 + [ LITr 00 ] + DUP2 #0006 ADD2 SWP2 + &l ( -- ) + [ LITr 10 ] SFTr + [ LIT2 &x $2 ] OVR2 get-pixel STH ORAr + INC2 GTH2k ?&l + POP2 POP2 + STHr [ LIT "? ] ADD + +JMP2r + @get-row ( x* y* -- row* ) STH2k ( ) #03 SFT2 SWP2