CHAPTER 4: ASSEMBLER
54
EPSON
S5U1C63000A MANUAL
(S1C63 FAMILY ASSEMBLER PACKAGE)
Types of pseudo-instructions
The following 25 types of pseudo-instructions are available:
#include #define #macro #endm #ifdef #ifndef #else #endif #defnum
.abs .align .org .code .data .bss .codeword .word .comm .lcomm
.global .set .list .nolist .stabs .stabn
For details of each pseudo-instruction and its functionality, refer to Section 4.7, "Assembler Pseudo-
Instructions".
Restriction
The mnemonics and pseudo-instructions are all not case sensitive. Therefore, they can be written in
uppercase (A–Z) characters, lowercase (a–z) characters, or both. For example, "ld", "LD", and "Ld" are
all accepted as "ld" instructions. However, the user defined symbols used in the operands or param-
eters are case sensitive. They must be the same with the defined characters. When assembling with the
"-c" option, all symbols are case insensitive.
4.5.3 Symbols (Labels)
A symbol (label) is an identifier designed to refer to an arbitrary address in the program. It is possible to
refer to a branch destination of a program or a data memory address using the defined symbol.
Definition of a symbol
Usable symbols are defined as 16-bit values by any of the following methods:
1. <Symbol>:
Example:
LABEL1:
... LABEL1 is a label that indicates the address of a described location.
Preceding spaces and tabs are ignored. It is a general practice to describe from the top of a line.
2. Definition using the
.set pseudo-instruction
Example:
.set ADDR1 0xff00
... ADDR1 is a symbol that represents absolute address 0xff00.
3. Definition using the
.comm or .lcomm pseudo-instruction
Example:
.comm
BUF1 4
... BUF1 is a label that represents a RAM address.
The .comm and .lcomm pseudo instructions can define labels only in bss sections (data memory
such as RAM). Program memory addresses cannot be defined.
Reference with symbols
A defined symbol denotes an address.
The actual address value should be determined in the linking process, except in the case of absolute
sections.
Examples:
LABEL1:
:
jr LABEL1
... jumps to the LABEL1 location.
.set IO_M 0xfff0
.org 0x0000
.bss
.comm COUNT1 1
.code
ldb
%ext,IO_M@h
ldb
%xl,IO_M@l
... 0xfff0 is loaded to X-register. (@h and @l are symbol masks.)
inc [COUNT1]
... Regarded as inc [0x0000].
Содержание S5U1C63000A
Страница 1: ...MF910 06 CMOS 4 BIT SINGLE CHIP MICROCOMPUTER S1C63 Family Assembler Package S5U1C63000A Manual ...
Страница 4: ......
Страница 14: ......
Страница 304: ......
Страница 305: ...S1C63 Family Assembler Package Quick Reference ...