]> git.sur5r.net Git - cc65/commitdiff
Fixed bug triggered if all 8 io buffer slots may be used.
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 26 Sep 2009 21:32:05 +0000 (21:32 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 26 Sep 2009 21:32:05 +0000 (21:32 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4242 b7a2c559-68d2-44c3-8de9-860c34a00d81

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
 
 ; ------------------------------------------------------------------------