CHAPTER 4: ASSEMBLER

4.7.11 Area Securing Pseudo-Instructions (.comm, .lcomm)

Instruction format

.comm <Symbol>[,] <Size>.lcomm <Symbol>[,] <Size>

<Symbol>:

Symbols for data memory access (address reference)

The 1st character is limited to a–z, A–Z, ? and _.

The 2nd and the subsequent character can use a–z, A–Z, 0–9, ? and _.

Uppercase and lowercase are discriminated.

When assembling with the "-c" option, all symbols are case insensitive.

One or more spaces or tabs are necessary between instruction and symbol.

<Size>:

Number of words of the area to be secured (4 bits/word)

Only decimal, binary and hexadecimal numbers can be described.

The size that can grammatically be specified is from 0 to 65,534.

One or more spaces, tabs or a comma (,) are necessary between symbol and size.

Sample description:

.bss

.comm RAM0 4

.lcomm BUF,1

Function

Sets an area of the specified size in the BSS section (RAM and other data memory), and creates a symbol indicating its top address with the specified name. By using this symbol, you can describe an instruction to access the RAM.

Difference between .comm and .lcomm

The .comm pseudo-instruction and the .lcomm pseudo-instruction are exactly the same in function, but they do differ from each other in the scope of the symbols they create. The symbols created by the

.comm pseudo-instruction become global symbols, which can be referred to externally from other modules (however, the file to be referred to needs to be specified by the .global pseudo-instruction.) The symbols created by the .lcomm pseudo-instruction are local symbols, which cannot be referred to from other modules.

Precaution

The .comm and .lcomm pseudo-instructions can only be described in BSS sections.

80

EPSON

S5U1C63000A MANUAL

 

 

(S1C63 FAMILY ASSEMBLER PACKAGE)