X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fcbm%2Fwrite.s;h=7a27f00445831f5626f27c444b41424bab7527b4;hb=f7636fe8f2de6e457fe1c3b0a55856513dca3ef1;hp=20999d2aceba98adca7a6fc21b9134971f4beb88;hpb=e809d6bf0d0ed35bee291cffb845b280e42a9bc6;p=cc65 diff --git a/libsrc/cbm/write.s b/libsrc/cbm/write.s index 20999d2ac..7a27f0044 100644 --- a/libsrc/cbm/write.s +++ b/libsrc/cbm/write.s @@ -7,7 +7,6 @@ .export _write .constructor initstdout - .import SETLFS, OPEN, CKOUT, BSOUT, READST, CLRCH .import rwcommon .importzp sp, ptr1, ptr2, ptr3 @@ -61,10 +60,10 @@ ; Output the next character from the buffer @L0: ldy #0 - lda (ptr2),y - inc ptr2 + lda (ptr1),y + inc ptr1 bne @L1 - inc ptr2+1 ; A = *buf++; + inc ptr1+1 ; A = *buf++; @L1: jsr BSOUT ; Check the status @@ -84,9 +83,9 @@ ; Decrement count -@L2: inc ptr1 +@L2: inc ptr2 bne @L0 - inc ptr1+1 + inc ptr2+1 bne @L0 ; Wrote all chars or disk full. Close the output channel