From 9733cb496fcb7e14012ec3f03f69bb29cc8077c5 Mon Sep 17 00:00:00 2001 From: Lacanoid Date: Thu, 17 Mar 2022 22:27:51 +0100 Subject: [PATCH] pip++ --- pip.s | 27 +++++++++++++++++++++++---- run64.d64 | Bin 174848 -> 174848 bytes run64.d71 | Bin 349696 -> 349696 bytes run64.d81 | Bin 819200 -> 819200 bytes 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/pip.s b/pip.s index af40fba..4f193fa 100644 --- a/pip.s +++ b/pip.s @@ -23,6 +23,7 @@ SIZE: .word 0 FA1: .byte 8 FNADR1: .word 0 FNLEN1: .byte 0 +FNLEN2: .byte 0 .include "utils.s" @@ -30,7 +31,7 @@ FNLEN1: .byte 0 ; message table; last character has high bit set MSGBAS =* MSG0: .BYTE "PIP 0.2",13+$80 -MSG1: .BYTE "COPYING... ",$80 +MSG1: .BYTE "COPYING ",$80 MSG2: .BYTE "ERROR ",$80 MSG3: .BYTE " BYTES.",13+$80 @@ -67,7 +68,9 @@ args: bcs @l31 jmp open_files -prep_copy: ; separate source and destination name +; separate source and destination names +; source becomes current file, destination goes to FNADR1 and FNLEN1 +prep_copy: lda FNLEN sty FNLEN1 sec @@ -85,6 +88,9 @@ prep_copy: ; separate source and destination name sta FNADR+1 open_files: + lda FNLEN + sta FNLEN2 + beq @of1 ; open input lda #pipfhi tay @@ -98,6 +104,13 @@ open_files: ; open output lda FNLEN1 beq redirect ; no output + + LDY #MSG1-MSGBAS ; display + JSR SNDMSG + jsr print_name + jsr CRLF + + lda FNLEN1 ldx FNADR1 ldy FNADR1+1 jsr SETNAMX @@ -121,21 +134,26 @@ open_files: redirect: ; set input + lda FNLEN2 + beq @rdro ldx #pipfhi jsr CHKIN +@rdro: lda FNLEN1 beq copy_loop ldx #pipfho - jsr CHKOUT - +; jsr CHKOUT ldy #0 copy_loop: + jsr GETIN tax jsr READST bne feof + ; enable quote mode + ; most controls are displayed as reverse characters lda #$FF sta QTSW @@ -152,6 +170,7 @@ copy_loop: jsr STOP bne copy_loop ; stop pressed + feof: AND #$BF beq done diff --git a/run64.d64 b/run64.d64 index 83a98742775f6945e0523621022199d96f17c134..470af843a2ad564aad0e5d5da1d32b52975a30d2 100644 GIT binary patch delta 618 zcmZ8dL1+_E5dDAGq~j`@)N0ecIP{VPZQ15fp{PNn*hsJ;Z3;Ok8>A%BHnG+qIW-3< zr4lLhkb;*bn9vO-7?1>;7KEx~rIjTId)1pKS&8Ct{o9^&`2X`~=Dp#)$$b%W?7X4Q zDe?SqnGhgHQQ9rPpIF5JB-mXaxzN8Pfr{8MgWuq}3or`ozglxauwzc(J*XsZvGAVO zgf%W{PfGG<(Zbb4*dd%@*TxJ^^TQ7j7{w#2m_Gnq0OOQ~#vg4^w;$z2o;q} zlFjAT(``mkNWEqFVgCROzU}z6VFB_YY?NCsw>2UYlz^$ipP+aSC8~W)+lt1>E0JTnsE*!YmixzlQX#LaY+*nJS07rpmKN#sL9~g5qQyY?^Ej z_(YI#$5d#&rH$zWEA`XsWdm$Q z4nLX}>sXOj3XKT${%hhcebHmPm3@p_GlKf=?u=t9wbw7jLpsA<3w^1 cGY>Jgc-V=jSv8%C`-OFC>nvw!Im`L}0^eHP#Q*>R delta 678 zcma)2T}V@57(U-Q>E3-o=~&t!h*xh?#51RNN*RSUW967zG zun@eM5Wzumc%+SlQgRA`6+4tMyztt~uHt}2cb>juSKamU{k=TT^YJ`y;eZy{dP~|T z#V)7JaloC_%5LSOuZTW~v%To;>zws~j<|3658-(y;5}gPVyzSW`<4$Quol0?s`sox z7kIT*9gx3?Hm@ea4#%6V#<0m7qwqrnCh3uNEFA!*!8~K2`P=Ajw*KvzNaxNcL|D^# zm0O*wKig&!ja#pqS7Gk}Org>CbIB%@L|CfSUu_$l%%KOED>OmtIkBj_nYa1ok^KG` zpm!GgpwZKIv=JhNjJ^vrk2H>PW&CRCJnmY$zz!KtQ7lo-%@EwQSZ0h+8Fws=tk;d< zrZ~S|M?W>oi6FUH&W1?`@sx{U@~F#2Z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