Kodewerx
https://www.kodewerx.org/forum/

ARM9 ASM to GNU ASM?
https://www.kodewerx.org/forum/viewtopic.php?f=17&t=3252
Page 1 of 1

Author:  MP2E [ Thu Jun 21, 2007 5:06 pm ]
Post subject:  ARM9 ASM to GNU ASM?

Ok, I found out how to convert GNU Assembly to ARDS. But is there any docs on how to convert ARM9 ASM to GNU ASM?

Author:  nicky041192 [ Fri Jun 22, 2007 12:35 pm ]
Post subject:  Re: ARM9 ASM to GNU ASM?

how do you convert?

Author:  MP2E [ Fri Jun 22, 2007 6:45 pm ]
Post subject:  Re: ARM9 ASM to GNU ASM?

nicky041192 wrote:
how do you convert?

Using this: http://kodewerx.net/forum/download.php?id=25

Author:  Hextator [ Mon Jun 25, 2007 9:47 am ]
Post subject: 

I'm not sure what you're asking, but if you need to know the syntax to compile using kenobi's ASM to ARDS, here's an example script that should answer your questions:

ldr r4, Counter
ldrb r3, [r4]
ldr r0, IOFetch
ldrh r1, [r0]
mov r2, #0x100
and r1, r1, r2
cmp r1, #0x0
beq There
mov r0, #0x0
strb r0, [r4, #0x1]
b NoIncrement
There:
ldrb r0, [r4, #0x1]
cmp r0, #0x1
beq NoIncrement
add r3, #0x1
mov r0, #0x1
strb r0, [r4, #0x1]
NoIncrement:
cmp r3, #0x12
moveq r3, #0x0
strb r3, [r4]
ldr r6, IOFetch
ldrh r6, [r6]
mov r0, #0x4
and r6, r6, r0
mov r2, #0x1
ldr r5, Base
ldr r5, [r5]
mov r0, #0x9
lsl r0, r0, #0x8
add r0, #0x74
add r0, r0, r5
ldr r0, [r0]
str r3, [r0, #0x10]
str r3, [r0, #0x14]
cmp r6, #0x0
streq r2, [r0]
mov r0, #0xb
lsl r0, r0, #0x8
add r0, #0x84
add r0, r0, r5
ldr r0, [r0]
str r3, [r0, #0x10]
str r3, [r0, #0x14]
cmp r6, #0x0
streq r2, [r0]
mov r0, #0xd
lsl r0, r0, #0x8
add r0, #0x94
add r0, r0, r5
ldr r0, [r0]
str r3, [r0, #0x10]
str r3, [r0, #0x14]
cmp r6, #0x0
streq r2, [r0]
mov r0, #0xf
lsl r0, r0, #0x8
add r0, #0xa4
add r0, r0, r5
ldr r0, [r0]
str r3, [r0, #0x10]
str r3, [r0, #0x14]
cmp r6, #0x0
streq r2, [r0]
bx lr
IOFetch:
.long 0x4000130
Counter:
.long 0x23fffe8
Base:
.long 0x217bc14

C wat i did thar?

Edit: Don't leave your script terribly unoptimized like the one above ^ >____>

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/