Epson S5U1C62000A Computer Hardware User Manual


 
54 EPSON S5U1C62000A MANUAL
(S1C60/62 FAMILY ASSEMBLER PACKAGE)
CHAPTER 5: ASSEMBLER
Types of pseudo-instructions
The following 23 types of pseudo-instructions are available:
#include #define #macro #endm #ifdef #ifndef #else #endif
.align .org .page .bank .code .bss .codeword .comm .lcomm
.global .set .list .nolist .stabs .stabn
The assembler supports the old-format pseudo-instructions for asm62XX as well as the above instruc-
tions.
For details of each pseudo-instruction and its functionality, refer to Section 5.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.
5.5.3 Labels
A 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 a symbol defined as a label.
Definition of a label
Usable labels are defined as 13-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
.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 labels
A defined symbol denotes the address of a described location.
An actual address value should be determined in the linking process, except in the case of absolute
sections.
Examples: LABEL1:
:
jp LABEL1 ... Jumps to the LABEL1 location.
.comm BUF 0x04
.code
ld a,BUF&0b11110000
ld xh,a
ld b,BUF&0b00001111
ld xl,b ... The address defined in BUF is loaded to X register.