BL jumps to relative address.
Therefore, even if you simply copy it will not work.
As Teq says, please use absolute addressed jump.
Get an assembler such as DevkitPro.
When calling from FEBuilderGBA, set it to Path 2.
Once this setting is made,
You can use ASM.
Choose Top Menu "Open" menu -> "Insert ASM",
On the disassembler screen, select "Import from file".
If you want to add a routine to 0xD00010.
First, after displaying 0xD00010, select Import Form File in the lower right.
Default is in the mode to install hook, so change it.
This time, it is the second option because we want to write data to 0xD00010.
select (2. Embed at give address).
I will briefly explain each mode.
1.No,it does not interfere with ROM
It only compile (assemble).
The result is saved in a dmp file.
In this mode, it does not write to ROM.
2. Embed at give address (This time I choose this.)
Writes the compiled (assembled) result to the specified address.
3. Place it in the free area and embed the jump code
Create a hook routine in the specified location, and create a jump code to the asm routine written in the free area.
It want to add processing to the routine but use it when there is no capacity to add.
Hook code creates 8 bytes to 10 bytes on the spot and moves it to your asm routine.
Add the technically asm file to the. s file.
Teq has forgotten to write .thumb, so please add it to the beginning.
.thumb @Please add this.
Please write with the Open button.
When writing is successful, if you look at 0xD0010, the specified asm routine is written.
After that, actually read this routine and test the operation.
If it does not work properly, please use no$gba-debugger etc.