Cool :-D
This is my version of your code in thumb lol:
Compiles to [activator L+R]:Code:@Convert to thumb add r2, pc, #1 bx r2 .thumb ldr r5,Mail @r5 holds mail ldr r3,Drawer @r3 holds drawer mov r1,#0xC @C in hexadecimal=12 in decimal (0x21EC200+0xC should give yu tenth slot) ldrh r0,=0x894 @Lol i think...[0x021D8014+0x894=-0x21D88A8 (last mail slot) Loop: ldrh r2,[r3,r1] @load items in last slot of drawer strh r2,[r5,r0] @store that item in last slot of mail sub r0,r0,#0xF4 @subtract the difference sub r1,r1,#0x2 @subtract the difference so now theres an item in all slots bpl Loop bx lr .arm Mail: .long 0x21D8014 Drawer: .long 0x21EC200
Code:94000130 FCFF0000 023FF090 012FFF11 E0000000 00000028 E28F2001 E12FFF12 4B054D04 4805210C 522A5A5A 390238F4 4770D5FA 021D8014 021EC200 00000894 023FF090 E3520003 D2000000 00000000
Last edited by Demonic722; 07-12-2012 at 12:41 PM. Reason: Formatting...
3DS Friend Code: 4699-6293-3106
I'll try to test it but I don't entirely understand what you did! Lol
What dont you understand about it...?
Say what you mean, mean what you say, and let your actions speak for you.
No problem.
3DS Friend Code: 4699-6293-3106
I made my code shorter...
heres my version in thumb. (Needs activator and terminator added if one were to use it.)
023FF090 012FFF11
E0000000 0000002A
E28F2001 E12FFF12
49054806 880D4C03
31028005 42A130F4
4770DDF9 021EC212
021EC200 021D8014
0000F402 00000000
023FF090 E3520003
Heres the source:
@{{Convert to thumb}}
add r2, pc, #1
bx r2
.thumb
ldr r0, Mail
ldr r1, Dresser
ldr r4, Limit
Fred:
ldrh r5, [r1]
strh r5, [r0]
add r1, #0x2
add r0, #0xf4
cmp r1, r4
ble Fred
bx lr
.arm
Limit:
.long 0x021ec212
Dresser:
.long 0x021ec200
Mail:
.long 0x021d8014
D:
.byte 0x02
M:
.byte 0xf4
Last edited by Drew956; 07-25-2010 at 10:27 PM. Reason: Smooshed some bugs :D
Cool. Using the Code BBC is better.
Example:
Code:023FF090 012FFF11 E0000000 0000002A E28F2001 E12FFF12 49054806 880D4C03 31028005 42A130F4 4770DDF9 021EC212 021EC200 021D8014 0000F402 00000000 023FF090 E3520003Code:@{{Convert to thumb}} add r2, pc, #1 bx r2 .thumb ldr r0, Mail ldr r1, Dresser ldr r4, Limit Fred: ldrh r5, [r1] strh r5, [r0] add r1, #0x2 add r0, #0xf4 cmp r1, r4 ble Fred bx lr .arm Limit: .long 0x021ec212 Dresser: .long 0x021ec200 Mail: .long 0x021d8014 D: .byte 0x02 M: .byte 0xf4
Last edited by Demonic722; 07-12-2012 at 12:34 PM.
3DS Friend Code: 4699-6293-3106
Since this is an ASM thread, I'll ask one of my own questions
In THUMB, I noticed there's an "if-then" instruction, but I can't figure out how to use it. If I could figure it out, I could execute conditional stuff in THUMB (like streq, strne, etc)
Does anyone here know how?
I do that but it never compiles, and keeps saying "incorrect condition in IT block"Code:Makes up to four following instructions conditional, according to pattern. pattern is a string of up to three letters. Each letter can be T (Then) or E (Else). The first instruction after IT has condition cond. The following instructions have condition cond if the corresponding letter is T, or the inverse of cond if the corresponding letter is E.
Always willing to help with anything, code-related or not. :]
Well.. I am still not very good at asm but I understand the basics so I am happy
But I do have a question that I would like answered please...
How do you trace or use a debugger to find the asm a game uses?
I want to find the asm in acww for digging holes and things like that.
Also.. is their a specific nds code for NOP? Or is it just a bunch of zeros?
Thank you!!
Sincerely,
~Drew956
(Also I think I need to download an emulator to use a debugger right? Do I need to download anything else?)