Blah
Free supporter
- 1,924
- Posts
- 12
- Years
- Unknown Island
- Seen Feb 19, 2025
I have a problem with your first routine. Here's what I got https://i.imgur.com/obuckLm.png
My code:Spoiler:.align 2
.thumb
main:
push {r0-r1,lr}
ldr r0, pokemon_data
ldrh r0, [r0]
ldr r1, var
strh r0, [r1]
pop {r0-r1, pc}
.align 2
pokemon_data: .word 0x02024284 + 0x54
var: .word 0x20370D0
I also tried those ( 03 B5 02 48 80 88 02 49 08 80 03 BD 84 42 02 02 D0 70 03 02 ) assembled numbers and still got the same result. Why is this happening?
Hi. If I'm understanding this correctly, you're trying to check the Pokemon's level (hence 0x02024284 + 0x54) ? Well a Pokemon's level is 0-100, which can be represented in hex as 1 byte (0x64 being 100)
Code:
ldr r0, pokemon_data
ldrh r0, [r0]