Allocating .Bss Blocks Within A Page - Texas Instruments TMS320C54x User Manual

Digital signal processors
Hide thumbs Also See for TMS320C54x:
Table of Contents

Advertisement

Figure 4–5. Allocating .bss Blocks Within a Page
The blocking option allows you to reserve up to 128 words in the .bss section
and ensure that they fit on one page of memory. (Of course, you can reserve
more than 128 words at a time, but they cannot fit on a single page.) The follow-
ing example code reserves two blocks of space in the .bss section.
memptr:
.bss
memptr1:
.bss
Each block must be contained within the boundaries of a single page; after the
first block is allocated, however, the second block cannot fit on the current
page. As Figure 4–5 shows, the second block is allocated on the next page.
0
a
Page
boundary
127
b
256
Section directives for initialized sections (.text, .data, and .sect) end the cur-
rent section and begin assembling into another section. The .bss directive,
however, does not affect the current section. The assembler assembles the
.bss directive and then resumes assembling code into the current section. For
more
information
Introduction to Common Object File Format .
Reserve Space in the .bss Section
A,64,1
B,70,1
Memory
Memory allocated by first .bss direc-
tive; 64 words left in the first page
Hole in memory left because second
.bss directive required more than 64
words
Memory allocated by second .bss di-
rective; 58 words left in the second
page
Unused memory
about
COFF
sections,
see
Chapter
Assembler Directives
.bss
2,
4-31

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C54x and is the answer not in the manual?

Table of Contents