From a1461fd46ae3d68cf9a47ecb7f8c615c9b7f0f53 Mon Sep 17 00:00:00 2001 From: neauoire Date: Sat, 28 Oct 2023 20:08:05 -0700 Subject: [PATCH] Starting icnsix --- gui/sixels/dafu10x10.icn | Bin 0 -> 2048 bytes gui/sixels/icnsix.tal | 74 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 gui/sixels/dafu10x10.icn create mode 100644 gui/sixels/icnsix.tal diff --git a/gui/sixels/dafu10x10.icn b/gui/sixels/dafu10x10.icn new file mode 100644 index 0000000000000000000000000000000000000000..e88d7a16843e3d0e65766c25ca9a4c4cd4ca722a GIT binary patch literal 2048 zcmb_dUuYaf7@yg_%N}WyZH`1G)$X-LiK4wi!Rm{(e}QV6p&2FsZ`A>U%c#LhF^r)| z=LqL<5larnRSW~jA_w+M9FOY)Hm!QaVC#h@MQkfA3G^w{NDyTT%&va~|*@=ym_-TGusA?XHidh}JOq zH%>YXRzG1e!B`^UT7wcD#49UajJv?0RK7-o4{+WZdS0E!C{ z2;y2xIse8vqJPPX=AtsX%%p4@>Ri`mcBgqw`FTi$w+-O$SAa5!3EPt zA6+O-&)=0h_3rtd`TVvE1nALIgw%FCJT_MupF2~-Nw!T2sy6V*h*B1C?2Xf9Lgqar z5pKpVROTxcsc!~qI(h7AJ2yVIHIpC8(|d*=xIa(G9e*6yb>5mA|LNm_gE%WkYI}ap zZja{M@6&bT&i(t2)b76O%gRWI z^?ug%xm;@>?`F65itHmYiBPu^njL=etZv>n@mi;K?Q%Vgk~({QmN^bMvfj_To*z&I zrntafn>lgwHQK!{vm*0~msng0@AI2qh z@j*3^@$I$jK}j&i!YG;~IJOYJBL0ezfa z@sMA$F@ooxdi{%cUV8Qk5H_V#$T|kY7USh2!oz}rJO#Lrdy_l@yFu{52@Q`KlSzV^ z)sxL;vn|o6Hyd@RH_Zsa_|I1n+9jqfdgf8rzENc-X+*nefM literal 0 HcmV?d00001 diff --git a/gui/sixels/icnsix.tal b/gui/sixels/icnsix.tal new file mode 100644 index 0000000..6b805fc --- /dev/null +++ b/gui/sixels/icnsix.tal @@ -0,0 +1,74 @@ +|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1 +|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 + +|0000 + + @src $40 + +|0100 + +@on-reset ( -> ) + ;on-console .Console/vector DEO2 + BRK + +@on-console ( -> ) + .Console/read DEI DUP #20 LTH OVR #7f GTH ORA ?{ + ;src scap STA + BRK } + POP + ( | get size ) + ;src scap #0009 SUB2 get-size + ( h ) ;img/height STA + ( w ) ;img/width STA + ( | load data ) + ;src .File/name DEO2 + #00 ;img/width LDA #00 ;img/height LDA #30 SFT2 MUL2 .File/length DEO2 + ;img/data .File/read DEO2 + #010e DEO + #010f DEO + BRK + +@get-size ( 00x00* -- w h ) + DUP2 sbyte #00 EQU ?&cancel + INC2k INC2 LDA LIT "x NEQ ?&cancel + INC2k INC2 INC2 sbyte #00 EQU ?&cancel + ( y ) INC2k INC2 INC2 sbyte STH + ( x ) sbyte STHr JMP2r + &cancel POP2 #0000 JMP2r + +( +@|stdlib ) + +@sbyte ( str* -- byte ) + ( hn ) LDAk chex #40 SFT STH INC2 + ( ln ) LDA chex STHr ORA JMP2r + +@chex ( c -- val? ) + ( dec ) [ LIT "0 ] SUB DUP #09 GTH ?{ JMP2r } + ( hex ) #27 SUB DUP #0f GTH ?{ JMP2r } + ( err ) POP #ff JMP2r + +@slen ( str* -- len* ) + DUP2 scap SWP2 SUB2 JMP2r + +@scap ( str* -- end* ) + LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w + JMP2r + +@phex ( short* -- ) + SWP phex/b &b DUP #04 SFT phex/c &c #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO + JMP2r + +@ ( str* -- ) + &w ( -- ) + LDAk #18 DEO + INC2 LDAk ?&w + POP2 JMP2r + +( +@|memory ) + +@img &size &width $1 + &height $1 + &data +