unconditional branch wasn't always taken because stepptr doesn't always return with Z=0

This commit is contained in:
4am 2021-11-21 15:34:44 -05:00
parent 5db033f8ef
commit 9f5fd1e382
1 changed files with 5 additions and 2 deletions

View File

@ -395,8 +395,11 @@ okvs_next_field
+ST16 PTR
okvs_next_field_PTR_is_already_set
jsr stepptr
bne incptr
jmp incptr ; do NOT change this to BNE
; because if the low byte of PTR is 0
; and the value of (PTR) is also 0
; then stepptr will return with Z=1 and
; we will fall through here unexpectedly
incptr4 jsr incptr2
incptr2 jsr incptr
incptr