gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

ASM > switching to GAS

#23591 - Darmstadium - Thu Jul 15, 2004 10:04 pm

i'm finally getting around to switching over to GAS! but i'm having a problem. I can't get any of my code to work. it assembles ok but none of it does anything; there is just a white screen. here is what I'm trying to assemble:
Code:

     .arm
     .align 4
     
start:
ldr r0,=0x40000000
ldr r1,=0x401
str r1,[r0]

ldr r0,=0x60000000+10*2+10*2*240
ldr r1,=0x7FFF
str r1,[r0]

mainloop:
b mainloop

.pool


i'm using the following dos commands to compile (just typing them in for now):
path=c:\devkitadv\bin
gcc -c testasm.s
objcopy -O binary testasm.o testasm.gba
does anybody know what I'm doing wrong?

thanks

#23597 - col - Fri Jul 16, 2004 12:31 am

There are too many zeros on your addresses - assuming you are trying to write to DISPCNT and then to vram.

cheers

Col

#23598 - Darmstadium - Fri Jul 16, 2004 12:41 am

wow that was stuipid...thanks!