4 ms·
This means that they test some condition, and then either transfer control flow to the next instruction, or to a different label. This means that we can mark th
by ericfrederich 9y ago
This means that they test some condition, and then either transfer control flow to the next instruction, or to a different label. This means that we can mark the possible branch address and the next address as instructions.
I hope all of these NES ROMs were coded well. Seems like you could do something like...
if False:
jump_to_data_address
... then he'd be interpreting data as code.
- dezgeg 9y agoThis actually happens surprisingly often in 6502 code, because unconditional branches always take three bytes, unlike conditional jumps which take two bytes. So if the value of some condition flags are known to be constant (e.g. ORing with a nonzero constant always clears the zero flag) it saves a byte to use an always-true conditional jump in place of an unconditional jump.