]> git.sur5r.net Git - cc65/blobdiff - libsrc/cbm/read.s
Add definitions in telestrat.inc (TELEMON 2.4)
[cc65] / libsrc / cbm / read.s
index e0fd8d51b5dd8aff89d07fffa83ae979c8b309c3..ee01596aa6ada0881eabfb0905d4cc7eeb76e252 100644 (file)
@@ -8,7 +8,6 @@
         .export         _read
         .constructor    initstdin
 
-        .import         SETLFS, OPEN, CHKIN, BASIN, CLRCH, BSOUT, READST
         .import         rwcommon
         .import         popax
         .importzp       ptr1, ptr2, ptr3, tmp1, tmp2, tmp3
@@ -22,7 +21,7 @@
 ;--------------------------------------------------------------------------
 ; initstdin: Open the stdin file descriptors for the keyboard
 
-.segment        "INIT"
+.segment        "ONCE"
 
 .proc   initstdin
 
 
         ldy     #0
         lda     tmp1
-        sta     (ptr2),y
-        inc     ptr2
+        sta     (ptr1),y
+        inc     ptr1
         bne     @L1
-        inc     ptr2+1          ; *buf++ = A;
+        inc     ptr1+1          ; *buf++ = A;
 
 ; Increment the byte count
 
 
 ; Decrement the count
 
-@L3:    inc     ptr1
+@L3:    inc     ptr2
         bne     @L0
-        inc     ptr1+1
+        inc     ptr2+1
         bne     @L0
         beq     done            ; Branch always