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 > need DevKitARM conventions

#34881 - mentz - Thu Jan 27, 2005 7:07 pm

Hi!
These are my problems:
1)I'm a newbie
2)I have problems to convert some Goldroad source code for devkitARM (r8)...

I have found an "@DCB" in an arm script (for Goldroad)...
I would like to write the same code (in ARM/Thumb) for DevKitARM...

3)I would like to know when i must use ".text" , ".data", ".align/2/4" at the beginning of file.

4)What exactly do ".ltorg" ?


Thanks to all...
_________________
xXx

#34930 - sasq - Fri Jan 28, 2005 8:47 am

"@DCB" is ".byte" in gas

".section text" is for code to be placed in rom
".section data" is for initialized data in RAM
".section bss" is for uninitialized data (takes no space in the GBA-file)

you only need to use ".align" if you need to specifcally align something (AFAIK), like this (more will start on 32bit aligned adress):

stuff:
.byte 1,2,3

.align 4

more:
.byte 5,6,7

#34939 - mentz - Fri Jan 28, 2005 2:26 pm

Thank you very much !!!

Now some things are more clear...
_________________
xXx

#35023 - Cearn - Sat Jan 29, 2005 2:44 pm

Perhaps the GAS manual can also be of some assistance (In various formats on the GNU site, or in CHM format over here). You'll find all the stuff sasq mentioned and more there. Including that .align n aligns to 2^n, not n. That would be .balign.

#35126 - mentz - Sun Jan 30, 2005 11:03 pm

thanks to you too!!


according to you, which is the best gba arm assembler for windows?
_________________
xXx