Calling ASM Routines by Name
4.24
Description Loading...
Credits
Defa
BroTacos
Step 1
Insert your ASM routine into free space (See Guide 1.10)
For this example I will be inserting the Get Party Pokemon Data ASM at 463580

Step 2
Select the second byte of the ASM routine and add an anchor that names your routine something related to its function
I will name my routine asm.getpartydata

NOTE: You may have to create a temporary pointer to be able to edit the anchor.
Type < then the offset of the ASM routine +1 then close with >
Once your anchor is added you can delete this pointer

Using this naming format has the added benefit of creating a menu item for your ASM routines that can be easily accessed.

Step 3
To use, go to the the script where your ASM will be used.
Typically you would type callasm <offset+1> to use call the ASM
With this you can do callasm asm.(name of routine from Step 2) instead.

NOTE: HMA will show the offset instead of the anchor name when the script is loaded again, but the in the hex viewer on the right the anchor pointer will be visible

Happy Hacking!


