I am learning ASM and I wanna make a simple code, like, an inventory slot modifier or something. Can someone help? *coughdemonicdrew&shawncough* :p
I am learning ASM and I wanna make a simple code, like, an inventory slot modifier or something. Can someone help? *coughdemonicdrew&shawncough* :p
Says the noob. :3
:P well
First of all, you need to understand how ASM works. Basically any ASM code you make is gonna load something, mess with that, and then store it somewhere, or some variation of that.
To load something you use a "ldr" operation. You can think of it as standing for "load directly into register"
To load a byte, youd use ldrb, a halfword would use ldrh, and a word would use ldr
A code like, 121D88FE 0000XXXX is a 16 bit write. So, to make this in ASM
ldr r0, =0x21D88FE @load where the value will be written to (in this case slot 1 address)
ldrh r1, =0x1566 @load 16bit value to write
strh r1, [r0] @store 0x1566 into 0x21D88FE
bx lr @this ends the code
Always willing to help with anything, code-related or not. :]
Okay, I understand the registers and ldr things and all, but what's with the x's? ;p
Says the noob. :3
XXXX is just the item hex, replace it with whatever item you want XD
Always willing to help with anything, code-related or not. :]
Nonono, just the simple 1 x in...
=0x21D88FE
Says the noob. :3
Do you have someone that teaches you via PM or IRC yet? If not, I'm sure Demonic or I could help. I think dboy would be happy to help too. It is much more efficient than posting on the forum every time you have a question.
The x is just part of the address. Don't question it.