.BSEG


Indicate to the assembler the start of a bit section.

[Syntax]

Symbol field
Mnemonic field
Operand field
Comment field
[section-name]
.BSEG
[relocation-attribute]
[; comment]

[Function]

-

The .BSEG directive indicates to the assembler the start of a bit section.

-

A memory following the .BSEG directive belongs to the bit section until it comes across a section definition directives.

[Description]

-

This directive defines a portion that defines bit data in a program.
This directive is valid until another section definition directive appears.

-

This directive can specify the start address of a section by specifying BIT_AT in the operand field.
In this case, the section name will be "the specified section name" + "_AT" + "specified address (hexadecimal notation in uppercase letters without prefix (0x or 0X) or suffix (h or H)".

-

The following shows the relocation attributes that can be specified through .BSEG.

Table 5.18

Relocation Attributes of .BSEG

Relocation Attribute

Description Format

Default Section Name

Explanation

Default Value of Alignment Condition

SBSS_BIT

SBSS_BIT

.sbss_bit

Allocates a section for bits having no initial values in the saddr areaNote 1 with the start address set to an even address. The optimizing linker links this section in byte units and assumes the relocation attribute as SBSS.Note 4 Note 5

2

BSS_BIT

BSS_BIT

.bss_bit

Allocates a section for bits having no initial values between addresses 0xF0000 and 0xFFFFF in the RAM areaNote 1 with the start address set to an even address so that it does not extend across a boundary of 64 Kbytes - 1Note 2. The optimizing linker links this section in byte units and assumes the relocation attribute as BSS.Note 4 Note 6

2

BIT_ATaddress

BIT_AT absolute- expressionNote 3

None

Allocates a section for bits having no initial values at a specified address. The optimizing linker links this section in byte units and assumes the relocation attribute as BSS_AT.Note 4 Note 7

1 (fixed)

Note 1.

For the code flash area, mirror area, RAM area, and saddr area, see the user's manual of the device. For the RAM area, note that only the on-chip RAM allocated to an address range from 0xF0000 to 0xFFFFF is supported.

Note 2.

Allocation beyond a boundary of 64 Kbytes - 1 is prohibited by default.

Note 3.

If the specified absolute expression is illegal or its value is outside the range from 0x00000 to 0xFFFFF, an error will occur.

Note 4.

The two sections with the same name and different relocation attributes SBSS and SBSS_BIT, relocation attributes BSS and BSS_BIT, or relocation attributes BSS_AT and BIT_AT are processed as a single consecutive section in the assembler.

Note 5.

The section is output to the object file with the relocation attribute of SBSS, and the optimizing linker allocates the section with the relocation attribute of SBSS.

Note 6.

The section is output to the object file with the relocation attribute of BSS, and the optimizing linker allocates the section with the relocation attribute of BSS.

Note 7.

The section is output to the object file with the relocation attribute of BSS_AT, and the optimizing linker allocates the section with the relocation attribute of BSS_AT.

-

The instructions that can be written in a section defined by this directive are the .DBIT, .EQU, .SET, .PUBLIC, .EXTBIT, and .EXTERN directives and macro calls.
An error will occur when other machine instructions or directives are written.

-

When a section definition does not include a section name, the assembler gives a separate default section name for each relocation attribute.
The following shows the section names given by the assembler.

Relocation Attribute

Section Name

SBSS_BIT

.sbss_bit

BSS_BIT

.bss_bit

BIT_ATaddress

.bit_AT start-address

 

A section having one of the above names has the corresponding relocation attribute shown above and no different relocation attribute can be assigned.

 

-

When a section definition does not include a relocation attribute, relocation attribute "SBSS_BIT" is assumed.

-

The following characters are usable in section names.

-

Alphanumeric characters (0-9, a-z, A-Z)

-

Special characters (@, _, .)

[Example]

To define section ".sbss_bit" having the SBSS_BIT attribute.

.sbss_bit  .BSEG  SBSS_BIT
sym01      .DBIT

 

To define section "_B" having the BSS_BIT attribute.

_B      .BSEG   BSS_BIT
        .DBIT
sym02   .DBIT

 

To define section "EX" having the BIT_AT attribute with address 0xffe20 specified.

The section name will be set to "EX_ATFFE20".

EX      .BSEG   BIT_AT 0xffe20
sym03   .DBIT
        .DBIT