#167525 - headspin - Tue Mar 17, 2009 1:22 pm
I've stumbled upon a strange bug that I can't figure out. I have a "C" file that contains a function that I call from an asm file.
I needed to jump to this function if a value is greater than another. So I use the blgt opcode but it jumps to the wrong address. If I change the blgt to a bl it wont crash. Very strange. So for a comparison I placed the two instructions next to each other like so.
And when I compile it looks like this
WTF? Why the different addresses?
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
I needed to jump to this function if a value is greater than another. So I use the blgt opcode but it jumps to the wrong address. If I change the blgt to a bl it wont crash. Very strange. So for a comparison I placed the two instructions next to each other like so.
Code: |
blgt resetFileStream
bl resetFileStream |
And when I compile it looks like this
Code: |
CB00436E blgt 20125A0h
FAFFFF7B blx 20015D8h |
WTF? Why the different addresses?
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game