4.5: BSS Section
- Page ID
- 19880
Uninitialized data is declared in the "section .bss" section. There must be a space after the word 'section'. All uninitialized variables are declared in this section. Variable names start with a letter followed by letters or numbers including some special characters (such as the underscore, "_"). Variable definitions must include the name, the data type, and the count.
The general format is:
<variableName> <resType> <count>
Refer to the following sections for a series of examples using various data types.
The supported data types are as follows:
Declaration | |
resb | 8-bit variable(s) |
resw | 16-bit variable(s) |
resd | 32-bit variable(s) |
resq | 64-bit variable(s) |
resdq | 128-bit variable(s) |
These are the primary assembler directives for uninitialized data declarations. Other directives are referenced in different sections.
Some simple examples include:
bArr resb 10 ; 10 element byte array wArr resw 50 ; 50 element word array dArr resd 100 ; 100 element double array qArr resq 200 ; 200 element quad array
The allocated array is not initialized to any specific value.