Results 1 to 10 of 45

Thread: My first attempts at ASM

Hybrid View

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

    Default

    Thanks I know I at least got the right address for the appearance.

  2. #2
    J.P. (Global Moderator) Maniac's Avatar
    Join Date
    Sep 2007
    Location
    Ohio, USA
    Posts
    2,083
    Blog Entries
    5

    Default

    Alright, I noted it but I really cant say much else until I knwoo which address is which... Fyi I changed some things to my liking.. it still does the same thing.
    Code:
    ldr r1, Addy1 @Load Addy1 into r1
    mov r5,#0x0 @mov 0x0 into r5
    mov r0,#0x8 @mov 0x8 into r0
    mov r2,#0xF @mov 0xF into r2
    loop:
    ldrb r3,[r1] @load byte from r1 into r3
    add r1,#0x1 @add 0x1 into r1
    cmp r3,#0x3A @compare r3 to 0x3A
    blt number @if less less than go to number
    add r3,#0x9 @Otherwise, add 0x9
    number:
    and r3,r2 @and r3,r2
    lsl r3,r0 @logical shift left, multiplies by two for every shift
    add r5,r3 @add r3 to r5 (why bother with this...?)
    sub r0,#0x4 @subtract 0x4 from r0
    bpl loop @branch if plus go to loop
    
    ldr r2, Addy2 @load Addy2 into r2
    strb r5,[r2] @Store byte of r5 into r2
    bx lr
     
    Addy1:
    .long 0x022AF136 @what address is this...?
    Addy2:
    .long 0x021D9018 @same as comment above...

    Say what you mean, mean what you say, and let your actions speak for you.


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

    Default

    022af136 Is the address of the chat thing (I think)
    021d9018 is your appearance (I got it from animal map in 32-bit mode)
    I edited it a little bit and got it to correctly change my hairstyle and eyes, but not my tan or hair color. Here is my new source and code:
    Code:
    removed
    Basically if I type 2 digits, it correctly changes my hair and eyes, but if I type any more than 2 it doesn't do anything else.
    Edit: Actually, it still doesn't do it right, but it at least edits my hair style and eyes somewhat.
    Last edited by dragonboy269; 04-28-2009 at 06:24 PM.

  4. #4
    J.P. (Global Moderator) Maniac's Avatar
    Join Date
    Sep 2007
    Location
    Ohio, USA
    Posts
    2,083
    Blog Entries
    5

    Default

    thats because your only running through the loop once? Just looking at a glance..

    Code:
    mov r0,#0x2
    ...
    sub r0,#0x4
    bpl loop

    Say what you mean, mean what you say, and let your actions speak for you.


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

    Default

    Uh..-asks noobish question- what do I put to run through more than once?
    I knew I had to do more than 1 loop but I couldn't figure out how to do it
    And it still probably won't work though

  6. #6
    J.P. (Global Moderator) Maniac's Avatar
    Join Date
    Sep 2007
    Location
    Ohio, USA
    Posts
    2,083
    Blog Entries
    5

    Default

    For starters shouldn't it be loading and storing a half word and not just a byte? Since I'm pretty sure it goes like.. 121D9018 0000xxxx

    Say what you mean, mean what you say, and let your actions speak for you.


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

    Default

    I used the text to item source though, and aren't item codes the same way? I'll try seeing what I did wrong

Posting Permissions

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