$FFE0:CD 24 A5 CMP $A524 = #$7F
$FFE3:B0 05 BCS $FFEA
$FFE5:A9 20 LDA #$20
$FFE7:65 02 ADC $0002 = #$20
$FFE9:60 RTS
$FFEA:CD 11 AC CMP $AC11 = #$7F
$FFED:B0 FA BCS $FFE9
$FFEF:A9 40 LDA #$40
$FFF1:65 02 ADC $0002 = #$20
$FFF3:60 RTS
This is my original idea and I based it on my DTE value checks, but I don't think I'm using the right code. I tried simplifying it by doing one CMP and BPL, but that also isn't working. What I'm trying to do is to have the game branch only when the data is between the specified range. Could I get some help on this? Thanks
Is this for the NES? If so, I'm a little confused as to why you're using ROM addresses ($A524, $AC11) with your compare instructions. Usually you compare against an immediate value or a value in RAM. Are the upper and lower bounds you want to check against stored at those addresses in ROM? If so, why? Wouldn't it be easier to use immediate values?
What is the range of data that you want to branch on?