- 6
- Posts
- 4
- Years
- Madagascar
- Seen Jun 27, 2022
Hello, I've just begin ROM Hacking for few weeks and now I want to learn ASM/Thumb.
So I've made simple routine to return a simple number (0x5) to a text of a person just for beginning.
The problem is that when I talk to the person it just return 0, maybe I dont know yet how to send that value to the script so can someone plz correct my code.
XSE script:
thumb:
So I've made simple routine to return a simple number (0x5) to a text of a person just for beginning.
The problem is that when I talk to the person it just return 0, maybe I dont know yet how to send that value to the script so can someone plz correct my code.
XSE script:
Code:
#org 0x800000
lock
faceplayer
callasm 0x08800101
buffernumber 0x0 LASTRESULT
msgbox 0x8800015 MSG_NORMAL '"the number is [buffer1]"
release
'---------
' Strings
'---------
#org 0x800015
= the number is [buffer1]
thumb:
Code:
.align 2
.thumb
main:
push {r0,lr}
ldr r0, param
pop {r0,pc}
.align 2
param:
.word 0x5