fix the mess

This commit is contained in:
Peter Ferrie 2019-07-04 19:03:14 -07:00
parent 1d23da8f7d
commit ebd442c223

View File

@ -73,9 +73,9 @@ TextRankCallback
+STAY zpword +STAY zpword
ldy #0 ldy #0
lda (zpstring),y lda (zpstring),y
sta gamelength
cmp InputLength cmp InputLength
bcc @no bcc ++
sta gamelength
lda #0 lda #0
sta runningscore sta runningscore
sta runningscore+1 sta runningscore+1
@ -93,7 +93,7 @@ TextRankCallback
cpy gamelength cpy gamelength
iny iny
bcc -- bcc --
@no rts ; no match :( ++ rts ; no match :(
+ +
ldx #80 ldx #80
cpy startat cpy startat
@ -113,15 +113,19 @@ TextRankCallback
sta runningscore sta runningscore
bcc + bcc +
inc runningscore+1 inc runningscore+1
+ cpy gamelength + tya
beq +
inc startat
ldy i ldy i
cpy InputLength cpy InputLength
bcs +
iny iny
sta startat
inc startat
cmp gamelength
bcc - bcc -
rts ; no match :(
+ lda runningscore +
lda runningscore
ldx runningscore+1 ldx runningscore+1
ldy gamelength ldy gamelength
jsr @div jsr @div