• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[ASM & Hex✓] call asm from asm routine

25
Posts
6
Years
    • Seen Apr 18, 2020
    is calling asm from asm routine possible, i mean in scripting we use callasm is it possible in compiling asm?
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    Just use instruction 'B{condition} <address>', I suppose.

    Or maybe you'll want "BL{condition} <address>" so that the CPU knows where to return to (or I guess you could manually set the LR before branching)?

    Anyway, I'm just guessing based on GBATEK, Althurdinok probably knows better than I do :)
     
    2
    Posts
    5
    Years
  • Or maybe you'll want "BL{condition} <address>" so that the CPU knows where to return to (or I guess you could manually set the LR before branching)?

    Anyway, I'm just guessing based on GBATEK, Althurdinok probably knows better than I do :)

    I'm new to asm as well :D. That's proper that BL is more often used. {condition} of branch includes L, XL, X, EQ, NE, etc.
    BL provides return,
    BX allows switching between arm and thumb mode....
    All these can be found by searching for documents on ARM instruction, though I just can't master them all now. :)
     
    Back
    Top