e.g.
Code: Select all
nop ; These 3 bytes I will replace with a jsr to my patch routine
lda ($10),y
return_point:
bmi blah
Code: Select all
my_routine:
lda ($10),y
cmp #$02
bne skip_done
iny ; Skip my $02 byte
lda ($10),y ; Load A with next byte so original code doesn't realise there was a $02
; Negative flag is set here because it reads $DB
dey ; Decrement Y so that it can be used with a destination copy
; Negative flag no longer set
rts
Assuming I'm right about this, then how can I re-test the value in A so that the N flag becomes set according to the value of A?
I wonder if ORA #$00 would do the trick?