chestertagat
Dumbest Person in the World.
- 63
- Posts
- 12
- Years
- Age 27
- Philippines
- Seen Nov 29, 2024
Hello guys!, I'm currently learning Assembly (Still a beginner) and im doing the excercises in the tutorials written by , Hackmew, ShinyQuagsire and FBI.
This is the code i have written:
.text
.align 2
.thumb
.thumb_func
main:
push {r0-r3, lr}
ldr r0, =(0x20370D0)
mov r3, #[r0]
mov r1, #0xD
mul r3, r3, r1
ldr r1, =(0x8247094)
add r1, r1, r3
strcopy:
ldrb r0, [r1]
cmp r0, #0xFF
beq done
ldr r2, =(0x2021d18)
ldrb r2, [r0]
add r1, r1, #0x1
add r2, r2, #0x1
b strcopy
done:
pop {r0-r3, pc}
.align 2
The error is:
:9: Error: cannot represent THUMB_IMM relocation in this object file format
I dont know if my code is correct ,
The challenge is from FBI's tutorial, here it is :
Thanks in Advance. (Also is there a section in here where beginners can do small ASM challenges, cause i feel like you'll learn more if you put your hands on it) Thanks.
Spoiler:
This is the code i have written:
.text
.align 2
.thumb
.thumb_func
main:
push {r0-r3, lr}
ldr r0, =(0x20370D0)
mov r3, #[r0]
mov r1, #0xD
mul r3, r3, r1
ldr r1, =(0x8247094)
add r1, r1, r3
strcopy:
ldrb r0, [r1]
cmp r0, #0xFF
beq done
ldr r2, =(0x2021d18)
ldrb r2, [r0]
add r1, r1, #0x1
add r2, r2, #0x1
b strcopy
done:
pop {r0-r3, pc}
.align 2
The error is:
:9: Error: cannot represent THUMB_IMM relocation in this object file format
I dont know if my code is correct ,
The challenge is from FBI's tutorial, here it is :
I think that once you've mastered this tutorial, you're probably well on your way to trying the intermediate ones. Before you go though, here's a nice little challenge.
Random move buffer!:
The scripting command "random" sets variable 0x800D to a random value between 0x0 and 0xFF. We will consider this value to be a random move ID. In the same script you will need to use the callasm command to go to your routine's address (don't forget to add 1). From there, make a routine which reads the value in variable 0x800D. Navigate the move table to the index specified by random and, copy the corresponding move name into the RAM location 0x2021D18.
Required info:
1) The move table starts at 0x8247094
2) Each index in the move table contains a move name
3) Each index in the move table is 13 bytes long (0xD in hex)
4) Each move name is 0xFF terminated to signify the end of the name
5) The RAM address of 0x800D is 0x20370D0
Thanks in Advance. (Also is there a section in here where beginners can do small ASM challenges, cause i feel like you'll learn more if you put your hands on it) Thanks.
Last edited: