]> git.sur5r.net Git - cc65/blobdiff - libsrc/apple2/cgetc.s
Support randomize().
[cc65] / libsrc / apple2 / cgetc.s
index b1bda8b9170e354ce518ff2e9bd4fafde6e70686..ecce9f9de129b04ed6e65e36202e9388fba8e6e2 100644 (file)
@@ -25,8 +25,11 @@ _cgetc:
         jsr     putchardirect   ; Returns old character in X
 
         ; Wait for keyboard strobe.
+:       inc     RNDL            ; Increment random counter low
+        bne     :+
+        inc     RNDH            ; Increment random counter high
 :       lda     KBD
-        bpl     :-              ; If < 128, no key pressed
+        bpl     :--             ; If < 128, no key pressed
 
         ; Cursor on ?
         ldy     cursor