Basically I'm looking for a special kind of Hex to ASM converter. I'm using a device called Action Replay (basically, it's a hex editor for Nintendo DS games) and I'm attempting to make codes for it using ASM (which I then convert into hex using a program, which I already have.). However, I can't find anything anywhere on the web that allows me to convert the hexadecimal stuff back into ASM . Here are examples of the assembly/hexes.
add r1,pc,#1
bx r1
.thumb
@[pointer] = r2
ldr r2, pointer
ldr r2,[r2]
cmp r2,#0
beq exit
mov r12,lr
@[rowSlot] = r0
ldr r5,far
ldr r3,[r2,r5]
bl checkslot
mov r0,r1
@[columnSlot] = r1
sub r5,#8
ldr r3,[r2,r5]
bl checkslot
bl notStanding
@[TileNo] = r2
mov r5,r0
add r5, #16
bl checke
sub r2,r4,#1
lsl r2,#2
mov r5,r1
add r5,#16
bl checke
add r2,r4
@[SlotNo] = r3
mov r5,r0
bl checke
lsl r3,r4,#4
sub r3,r0,r3
sub r3,#1
lsl r3,#4
mov r5,r1
bl checke
lsl r4,#4
sub r4,r1,r4
add r3,r4
@[FinalAddres] = r4
sub r2,#1
lsl r2,#8
sub r3,#1
add r4,r2,r3
lsl r4,#1
ldr r1, map
add r4,r1
@[texttoItem] = r5
ldr r1, text
mov r5,#0x0
mov r0,#0xC
mov r2,#0xF
loop:
ldrb r3,[r1]
add r1,#1
cmp r3,#0x3A
blt number
add r3,#9
number:
and r3,r2
lsl r3,r0
add r5,r3
sub r0,#0x4
bpl loop
@[write] == OK
strh r5,[r4]
bx r12
@[division macro]
checkslot:
lsr r3,#8
mov r1,#1
mov r4,#0x20
lsl r4,#4
sub r3,r4
div0:
cmp r3,#32
blt exit
cmp r1,#64
bge exit
add r1,#1
sub r3,#32
b div0
checke:
sub r5,#1
mov r4,#0
div:
cmp r5,#16
blt exit
add r4,#1
sub r5,#16
bge div
exit:
bx lr
notStanding:
ldr r4,button
ldrb r4,[r4]
cmp r1,#1
beq updown
cmp r1,#64
beq updown
mov r5,#0x10
tst r4,r5
beq right
mov r5,#0x20
tst r4,r5
beq left
updown:
cmp r0,#1
beq exit
cmp r0,#64
beq exit
mov r5,#0x40
tst r4,r5
beq up
mov r5,#0x80
tst r4,r5
beq down
b exit
right:
add r1,#1
b updown
left:
sub r1,#1
b updown
up:
sub r0,#1
b exit
down:
add r0,#1
b exit
.arm
far:
.long 0xFFFFFAC0
button:
.long 0x04000130
pointer:
.long 0x021C6DEC
map:
.long 0x021E5496
text:
.long 0x022AF136
which turns into
023FF090 012FFF11
E0000000 00000100
E28F1001 E12FFF11
68124A3A D04D2A00
4D3646F4 F0005953
1C08F836 59533D08
F831F000 F843F000
35101C05 F837F000
00921E62 35101C0D
F831F000 1C051912
F82DF000 1AC30123
011B3B01 F0001C0D
0124F826 191B1B0C
02123A01 18D43B01
49250064 49251864
200C2500 780B220F
2B3A3101 3309DB00
40834013 380418ED
8025D5F5 0A1B4760
24202101 1B1B0124
DB0B2B20 DA092940
3B203101 3D01E7F8
2D102400 3401DB02
DAFA3D10 4C104770
29017824 2940D007
2510D005 D00D422C
422C2520 2801D00C
2840D0F0 2540D0EE
D007422C 422C2580
E7E7D006 E7F23101
E7F03901 E7E13801
E7DF3001 FFFFFAC0
04000130 021C6DEC
021E5496 022AF136
023FF090 E3520003
(sorry if I got anything mixed up)
I want some kind of program that does the reverse. Instead of turning assembly into hex, it turns hex into assembly.