]> git.sur5r.net Git - cc65/blobdiff - libsrc/apple2/extra/iobuf-0800.s
Fixed bug triggered if all 8 io buffer slots may be used.
[cc65] / libsrc / apple2 / extra / iobuf-0800.s
index 386d9198895c6b56c0f6be7e13d89d0aa481177e..02685fae761ac66d273ff7691eda5b3f8d95b899 100644 (file)
@@ -27,11 +27,12 @@ initiobuf:
         ; Mark all remaining table entries as used
         tax
         lda     #$FF
+:       cpx     #MAX_FDS
+        bcc     :+
+        rts
 :       sta     table,x
         inx
-        cpx     #MAX_FDS
-        bcc     :-
-        rts
+        bne     :--             ; Branch always
 
 ; ------------------------------------------------------------------------