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 > Declaring BSS sections in Gnu Assembler?

#161322 - Dwedit - Fri Aug 01, 2008 8:01 am

How do you properly declare reserved space in a .bss or .sbss section in Gnu Assembler?

Is it just as simple as this:
.section .bss

This question applies to both the GBA and NDS.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#161445 - eKid - Sun Aug 03, 2008 11:58 pm

The ".section" part can even be left out for the text/data/bss/maybe other regular sections.

Code:

    .bss
    .align

word_a: .space 4
word_b: .space 4

    .text

    .thumb
    .etc

stuff:

And yes this is the same for DS/GBA