Results 1 to 10 of 18

Thread: ASM Please Check THis

Hybrid View

  1. #1

    Default

    Can it be done In standard ASM? I don't know Thumb ASM yet...
    http://siestacat.webs.com/GetAttachment.jpg

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

    Default

    Quote Originally Posted by siestacat View Post
    Can it be done In standard ASM? I don't know Thumb ASM yet...
    Uh,
    Code:
    ldr r3,TimeAddress
    ldr r4,[r3]
    
    ldr r0,IOKeys
    ldrh r0,[r0]
    mov r1,#0x11
    lsl r1,#4
    
    CheckForward:
    tst r0,r1
    beq Forward
    add r1,r1
    
    tst r0,r1
    bne Exit
    sub r4,#4
    Forward:
    add r4,#2
    str r4,[r3]
    Exit:bx lr
    
    
    IOKeys:
    .long 0x4000130
    TimeAddress:
    .long 0x21ECD84
    Code:
    023FF090 012FFF11
    E0000000 00000044
    E59F3038 E5934000
    E59F002C E1D000B0
    E3A01011 E1A01201
    E1100001 0A000003
    E0811001 E1100001
    1A000002 E2444004
    E2844002 E5834000
    E12FFF1E 04000130
    021ECD84 00000000
    023FF090 E3520003
    Notice what I did?

  3. #3

    Default

    Just took away the Convert to Thumb? lol
    http://siestacat.webs.com/GetAttachment.jpg

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

    Default

    Quote Originally Posted by siestacat View Post
    Just took away the Convert to Thumb? lol
    Yup
    Thumb isn't very different from standard, except some things are limited
    Just try making a regular ASM code then add the convert part and the .arm at the end

    if it gives you problems, look closely at the error output and do what it says, pretty soon you'll know what you can and can't do in thumb (that's how i learned)

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

    Default

    Thumb has no differance between "regular ASM" (properly known as ARM in this case..) its just thumb does not allow some of the things ARM does. Dragon, if you can send me which registers are used for which for thumb (as I dont use it enough to bother..) later on today it would be appreciated.

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


  6. #6

    Default

    I don't think it will, but does this work on wifi for other players?

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

    Default

    Works only for you.

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


Posting Permissions

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