Results 1 to 10 of 10

Thread: O:

Hybrid View

  1. #1

    Default O:

    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

  2. #2
    Member
    Join Date
    Aug 2008
    Location
    Arizona
    Posts
    1,073
    Blog Entries
    2

    Default

    :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. :]

  3. #3

    Default

    Okay, I understand the registers and ldr things and all, but what's with the x's? ;p
    Says the noob. :3

  4. #4
    Member
    Join Date
    Aug 2008
    Location
    Arizona
    Posts
    1,073
    Blog Entries
    2

    Default

    XXXX is just the item hex, replace it with whatever item you want XD
    Always willing to help with anything, code-related or not. :]

  5. #5

    Default

    Nonono, just the simple 1 x in...

    =0x21D88FE
    Says the noob. :3

  6. #6

    Default

    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.
    http://siestacat.webs.com/GetAttachment.jpg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •