diff --git a/cli/icnuf1/816-original.icn b/cli/icnuf1/816-original.icn new file mode 100644 index 0000000..6eb300a Binary files /dev/null and b/cli/icnuf1/816-original.icn differ diff --git a/cli/icnuf1/816.icn b/cli/icnuf1/816.icn index 0417868..e96d44b 100644 Binary files a/cli/icnuf1/816.icn and b/cli/icnuf1/816.icn differ diff --git a/cli/icnuf1/icnuf1.tal b/cli/icnuf1/icnuf1.tal index 9691184..acc66f8 100644 --- a/cli/icnuf1/icnuf1.tal +++ b/cli/icnuf1/icnuf1.tal @@ -1,5 +1,6 @@ ( uxncli format-c.rom file.bin ) +|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 $5 &write $1 &error $1 |a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 @@ -24,28 +25,38 @@ STH2r .File/name DEO2 #0800 .File/length DEO2 ;icn .File/read DEO2 - ( | convert ) + ( | write ) + ;src .File/name DEO2 + ;uf1 .File/write DEO2 + #0800 .File/length DEO2 #800f DEO BRK +@get-addr ( a -- addr* ) + STHk + ( y ) #04 SFT #00 SWP #0080 MUL2 + ( x ) STHr #0f AND #00 SWP #0008 MUL2 ADD2 JMP2r + @ ( a b -- ) OVR phex/b #2018 DEO - DUP phex/b #0a18 DEO - POP2 -JMP2r + DUP phex/b #2018 DEO + ( a -> a* ) OVR get-addr phex #2018 DEO + ( b -> b* ) DUP get-addr phex #0a18 DEO + SWP get-addr ;icn ADD2 ,&src STR2 + get-addr ;uf1 ADD2 ,&dst STR2 + ;&cmd .System/expansion DEO2 + JMP2r + &cmd [ 01 0008 0000 &src $2 0000 &dst $2 ] @ ( -- ) #0000 &l ( -- ) - ( | print pos ) ( y ) DUP #15 SFT OVR #01 AND ADD #40 SFT STH ( x ) DUP #01 SFT #0f AND - ( merge ) STHr ORA - OVR + ( merge ) STHr ORA OVR INC DUP ?&l - POP2 -JMP2r + POP2 JMP2r @blank [ ffff ffff ffff ffff ] @@ -79,4 +90,3 @@ JMP2r @uf1 $800 -