[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: And now, from the author of the DOS Disk post, a post that actually relates to this newsgroup.



Rubywand writes ...
> 
 ....

>      The end of the routine does a check for a keypress. If there is one, the
> routine does a throwaway CALL to RND in order to jiggle the sequence 

 ....

     Happened to notice that this trick to jiggle the RND sequence won't work.
Since the routine has only one CALL to RND and all of the addresses and screen
bytes come from the result, the extra call will just skip the writes for one value.
The sequence will not be changed.

     Since the jiggle feature is in the docs, the new version uploaded to GSWV uses
EOR's to a value changed according to keypresses to modify the sequence. This is
illustrated in the partial listing below.

....

1F3B: A5 CA     36            LDA   $CA
1F3D: 85 06     37            STA   $06
1F3F: A5 CB     38            LDA   $CB
1F41: 45 08     39            EOR   $08     ; screen address is modified according
1F43: 29 3F     40            AND   #$3F    ; to value in $0008
1F45: 09 20     41            ORA   #$20
1F47: 85 07     42            STA   $07
1F49: A5 CC     43            LDA   $CC
1F4B: 91 06     44            STA   ($06),Y
1F4D: AD 00 C0  45            LDA   RDKEY
1F50: 10 AE     46            BPL   STATIC
1F52: 85 08     47            STA   $08     ; for a non-RETURN keypress the key
1F54: AC 10 C0  48            LDY   CLRKEY  ; value becomes the EOR value in $0008
1F57: C9 8D     49            CMP   #$8D
1F59: D0 A5     50            BNE   STATIC
1F5B: 60        51            RTS




Ruywand