Results 1 to 9 of 9

Thread: [ASM] Town Cleaner code

Hybrid View

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

    Default

    Code:
     mov r3, #0x6F  #Wilted Red Tulips start at 6E
    I'll read the rest later.
    Last edited by Maniac; 07-12-2011 at 06:07 PM.

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


  2. The Following User Says Thank You to Maniac For This Useful Post:


  3. #2

    Default

    Thanks for your advices.

    I've fixed the ASM source:



    Edit: The AR codes in the first post are fixed (2 lines shorter).
    Last edited by MisterNobody; 07-13-2011 at 03:05 PM.

  4. #3

    Default

    It looks like the code posted was compiled with a different source XD. Not only because of the limitation of
    only 1 "ldrh r0-r5, LabelHere" rule in thumb, but no where in the code 0xFFF1, or 0x1FFE is seen. o.o
    3DS Friend Code: 4699-6293-3106

  5. #4

    Default

    I've just changed 2-3 things because it doesn't want to compile with this source. But don't worry, the code seems to work, I've tested it myself. :P

  6. #5

    Default

    Quote Originally Posted by MisterNobody View Post
    I've just changed 2-3 things because it doesn't want to compile with this source. But don't worry, the code seems to work, I've tested it myself. :P
    It doesn't compile because you have two "ldrh r0-r5, LabelHere" things XD :P
    3DS Friend Code: 4699-6293-3106

  7. The Following User Says Thank You to Demonic722 For This Useful Post:


  8. #6

    Default

    Oh that's it ! Thank you I'm going to fix the source again. xD

  9. #7

    Default

    I made a remove all weeds, and rafflesia code today (In ASM) ^_^
    Look at what I did to get FFF1, maybe you could add that to your new source:

    Code:
    @Branch To Thumb
    add r0,pc,#1
    bx  r0
    .thumb
    
    @Fetch 0xfff1
    ldr r0, Map
    ldrh r1, MapOffset
    lsl r2, r1, #3
    add r2, #1
    
    Loop:
    ldrh r3,[r0,r1]
    cmp r3, #0x1B
    beq RemoveWeed
    blt NoWeed
    cmp r3, #0x1F
    blt NoWeed
    cmp r3, #0x24
    ble RemoveWeed
    bgt NoWeed
    b NoWeed
    
    RemoveWeed:
    strh r2,[r0,r1]
    
    NoWeed:
    sub r1, #2
    bpl Loop
    bx lr
    
    .arm
    Map:
    .long 0x021E3124
    MapOffset:
    .short 0x1FFE
    Last edited by Demonic722; 12-06-2020 at 04:23 PM.
    3DS Friend Code: 4699-6293-3106

  10. The Following User Says Thank You to Demonic722 For This Useful Post:


Posting Permissions

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