( uxncli icnchr.rom img20x10.icn | output img20x10.chr ) |00 @System/vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1 |10 @Console/vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1 |a0 @File/vector $2 &success $1 &success-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 |b0 @File2/vector $2 &success $1 &success-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 |000 @src/buf $80 @dst/buf $80 |100 @on-reset ( -> ) .Console/type DEI ?{ ;dict/usage str/ #010f DEO BRK } ;src/on-console .Console/vector DEO2 BRK @src/on-console ( -> ) [ LIT2 02 -Console/type ] DEI LTH ?{ / BRK } icn/ #800f DEO BRK @src/ ( c -- ) .Console/read DEI [ LIT &ptr -&buf ] INCk ,&ptr STR STZ JMP2r @dst/ ( ext* buf* -- ) / [ LIT2 fc _&ptr ] LDR ADD ,&ptr STR ( >> ) @dst/ ( c -- ) &>w LDAk DUP ?{ POP POP2 JMP2r } [ LIT &ptr -&buf ] INCk ,&ptr STR STZ INC2 !&>w ( @|Core ) @icn/ ( -- ) ;src/buf .File/name DEO2 #0008 .File/length DEO2 ;dict/chr-ext ;src/buf dst/ ;dst/buf .File2/name DEO2 #0010 .File2/length DEO2 &>s ;&buf .File/read DEO2 .File/success-lb DEI ?{ JMP2r } ( | ch1 -> ch2 ) ;© .System/expansion DEO2 ;&buf .File2/write DEO2 !&>s &buf $8 &buf-ch2 $8 © [ 01 0008 0000 =&buf 0000 =&buf-ch2 ] ( @|Stdlib ) @str/ ( str* -- ) LDAk DUP ?{ POP POP2 JMP2r } #18 DEO INC2 !/ @dict/usage "usage: 20 "icnchr.rom 20 "input20x10.icn 0a00 &chr-ext ".chr 00