beautypg.com

13 comment adding function, 14 priority of pseudo-instructions – Epson S5U1C62000A User Manual

Page 94

background image

82

EPSON

S5U1C62000A MANUAL

(S1C60/62 FAMILY ASSEMBLER PACKAGE)

CHAPTER 5: ASSEMBLER

5.7.13 Comment Adding Function

The preprocessing pseudo-instructions that begin with "#" are all expanded to codes that can be as-
sembled, and delivered in the preprocessed file. Even after that, those instructions are rewritten with
comments beginning with a semicolon (;), so that the original instructions can be identified. However,
note that the replacements of Define names will not subsist as comments.

The comment is added to the first line following the expansion. In case the original statement is accompa-
nied by a comment, that comment is also added.
A macro definition should have a semicolon (;) placed at top of the line.

Example:

• Before expansion

#macro LDM REG,ADDR

LD X,ADDR

LD REG,MX

#endm

LDM A,1 ;load memory to A reg.

• After expansion (no debugging information)

;#macro LDM REG,ADDR

; LD X,ADDR

; LD REG,MX

;#endm

LD X,1 ; LDM A,1 ;load memory to A reg.

LD A,MX

5.7.14 Priority of Pseudo-Instructions

Some remarks concerning the priority among the preprocessing pseudo-instructions will be given below:

1. The conditional assembly instructions (#ifdef, #ifndef) have the first priority. Nesting cannot be made

of those instructions.

2. Define instruction (#define), include instruction (#include), or macro instruction (#macro) can be

described within a conditional assembly instruction.

3. Define instruction (#define), include instruction (#include), and macro instruction (#macro) cannot be

described within a macro definition.

4. Define name definitions are expanded with priority over macro definitions.