Support randomize().
In order to have randomize() work as expected (and the Apple II random number generation in general) it is necessary to update the random counter during keypress wait just like the ROM function does.
This commit is contained in:
parent
b6ccd4d5d4
commit
73faf60fe0
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue