Data Section Defining Directives (.Rodata, .Data) - Epson S5U1C17001C Manual

Cmos 16-bit single chip microcomputer, c compiler package for s1c17 family
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

8 aSSEMBlEr

8.5.2 Data Section Defining Directives (.rodata, .data)

list of data section defining directives
Declares a .rodata section in which constants are located.
.rodata
Declares a .data section in which data with initial values are located.
.data
instruction format
.section .rodata
.section .data
Description
(1) .section .rodata
Declares the start of a constant data section. Statements following this instruction are assembled as those to
be mapped in the .rodata section, until another section is declared. Usually, this section will be mapped
into a read-only memory at the stage of linkage.
Example: .section .rodata
(2) .section .data
Declares the start of a data section with an initial value. Statements following this instruction are assembled
as those to be mapped in the .data section, until another section is declared. Usually, this section will be
mapped into a read-only memory at the stage of linkage and data in this section must be copied to a read/
write memory such as a RAM by the software before using.
Example: .section .data
note
The data space allocated by the data-define directive is as follows:
1 byte: .byte
2 bytes: .short, .hword, .word, .int
4 bytes: .long
8-6
Defines a .rodata section.
Defines a .data section.
EPSOn
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
S5U1C17001C ManUal

Advertisement

Table of Contents
loading

Table of Contents