1. If you haven't already followed the
Setting up the compiler I suggest you do that first
2. Create a folder called devkitPro\source\gba\asmtest
.arm
.text
.global main
main:
mov r0, #0x4000000
mov r1, #0x400
add r1, r1, #3
str r1, [r0]
mov r0, #0x6000000
mov r1, #0xFF
mov r2, #0x9600
loop1:
strh r1, [r0], #2
subs r2, r2, #1
bne loop1
infin:
b infin
3. Run make
4. Open Visualboy Advanced emulator and open asmtest_mb.gba you should see the attached image
5. Congrats you have just created your first gba binary in assembly!
This code is from
GBAGuy's GBA asm tutorial