Contents    Page-10    Prev    Next    Page+10    Index   

Initializing BSS Storage

A block of data can be declared in assembly language with a BSS (Block Starting with Symbol) pseudo-op:


bigarray:    bss      8000000
Similar data can be declared in high-level languages:

double bigarray[1000][1000];
Instead of representing such a large block as a memory image, the block is represented in the absolute file by giving its starting address, size, and the initial value. The loader will fill the memory area with the initial value.

Although the loader might not have to initialize BSS areas, there are several advantages to doing so: