A.4.2
Defining a cost Constant with an Initial Value
Initialize a memory area in a ROMDATA section.
To define a ROMDATA section, use the .SECTION directive. To initialize memory, use the .BYTE directive for 1 byte, the .WORD directive for 2 bytes, the .LWORD directive for 4 bytes, the .FLOAT directive for floating-point 4 bytes, and the .DOUBLE directive for floating-point 8 bytes.
[Example]
.SECTION value,ROMDATA
work1: .BYTE "data"; Stores 1-byte fixed data in ROM
work2: .WORD "data"; Stores 2-byte fixed data in ROM
work3: .LWORD "data"; Stores 4-byte fixed data in ROM
work4: .FLOAT 5E2; Stores 4-byte floating-point data in ROM
work5: .DOUBLE 5E2; Stores 8-byte floating-point data in ROM
|