Dr. Seuss
Will finish GS Chronicles, I swear!
- 535
- Posts
- 11
- Years
- Guatemala City
- Seen May 9, 2025
I've been trying to insert an evolution method based on a flag. So basically if a flag is set, then Pokémon evolves. The issue I´m facing is that if the flag is nto set, everything continues, if the flag is set, rom crashes.
Here is the ASM code I wrote:
Why does my routine isn't working as intended?
Here is the ASM code I wrote:
Code:
.text
.align 2
.thumb
.thumb_func
.global setflagevo
main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrh r2, [r3, #0x2]
mov r0, r8
mov r5, #0x0
ldr r0, flag_number
ldr r2, flag_routine
ldrh r2, [r2, #0x0]
bl linker
cmp r0, #0x1
bne flagnotset
mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
linker:
bx r2
flagnotset:
pop {r0-r7}
ldr r0, noevo
bx r0
.align
flag_number: .word 0x00000(Flag Number)
flag_routine: .word 0x0806E6D0 +1
levelcheckloc: .word 0x08043017
noevo: .word 0x08043111
Why does my routine isn't working as intended?
Last edited: