CROSS ASSEMBLER ASM62XX
S1C62 FAMILY EPSON III-15
DEVELOPMENT TOOL REFERENCE MANUAL
4.5.3 Assembler control pseudo-instructions
■ END
END To terminate assembly
The END statement terminates assembly. All statements following the END statement are ignored. Be
sure to write this statement at the end of the program. If it is missing, assembly may not terminate.
A label can be written before the END statement, but it cannot be referenced because it is not cataloged
in the label table.
4.6 Macro-Functions
When using the same statement block at multiple locations in a program, the statement block can be called
using a name defined beforehand. A statement block that has been so defined is called a macro.
Unlike a subroutine, the statement block is expanded at all locations where it is called, so the programmer
should consider the statement block size and frequency of use and determine whether a macro or a subrou-
tine is more appropriate.
4.6.1
Macro-instructions
Example:
Source file
:
JPM LABEL2
:
PAGE 2
LABEL2 LD A,0
:
Assembly list file after expansion
:
JPM LABEL2
+ PSET LABEL2
+ JP LABEL2
:
PAGE 2
LABEL2 LD A,0
:
ASM62XX provides the macro-
instructions listed below so that
branching between pages is possible
without specifying the destination
page using the PSET instruction.
Character string ps represents 13-bit
immediate data that indicates the
branch-destination address. A label
can be used for it.
JPM ps
JPM C,ps
JPM NC,ps
JPM Z,ps
JPM NZ,ps
CALLM ps
PSET p
JP s
PSET p
JP C,s
PSWT p
JP NC,s
PSET p
JP Z,s
PSET p
JP NZ,s
PSET p
CALL s
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
1
0
0
0
s7
0
s7
0
s7
0
s7
0
s7
0
s7
1
s6
1
s6
1
s6
1
s6
1
s6
1
s6
0
s5
0
s5
0
s5
0
s5
0
s5
0
s5
p4
s4
p4
s4
p4
s4
p4
s4
p4
s4
p4
s4
p3
s3
p3
s3
p3
s3
p3
s3
p3
s3
p3
s3
p2
s2
p2
s2
p2
s2
p2
s2
p2
s2
p2
s2
p1
s1
p1
s1
p1
s1
p1
s1
p1
s1
p1
s1
p0
s0
p0
s0
p0
s0
p0
s0
p0
s0
p0
s0
1110987654321
0
Code
Mnemonic
after expansion
Macro-
instruction