Assembler control pseudo-instructions
4.5.3
END
END
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.
Macro-instructions
4.6.1
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.
Example:
Source file
Assembly list file after expansion
+
+
S1C62 FAMILY
DEVELOPMENT TOOL REFERENCE MANUAL
Macro-
instruction
JPM
JPM
JPM
JPM
JPM
CALLM
:
JPM
:
PAGE
LABEL2
LD
:
:
JPM
PSET
JP
:
PAGE
LABEL2
LD
:
To terminate assembly
Mnemonic
after expansion
11 10 9
1
ps
PSET
p
0
JP
s
1
C,ps
PSET
p
JP
C,s
0
1
NC,ps
PSWT
p
0
JP
NC,s
1
Z,ps
PSET
p
0
JP
Z,s
1
NZ,ps
PSET
p
JP
NZ,s
0
1
ps
PSET
p
0
CALL
s
LABEL2
2
A,0
LABEL2
LABEL2
LABEL2
2
A,0
EPSON
CROSS ASSEMBLER ASM62XX
Code
8
7
6
5
4
3
1
1
0
0
1
0
p4
p3
p2
0
0
0
s7
s6
s5
s4
s3
1
1
0
0
1
0
p4
p3
p2
0
1
0
s7
s6
s5
s4
s3
1
1
0
0
1
0
p4
p3
p2
0
1
1
s7
s6
s5
s4
s3
1
1
0
0
1
0
p4
p3
p2
1
1
0
s7
s6
s5
s4
s3
1
1
0
0
1
0
p4
p3
p2
1
1
1
s7
s6
s5
s4
s3
1
1
0
0
1
0
p4
p3
p2
1
0
0
s7
s6
s5
s4
s3
2
1
0
p1
p0
s2
s1
s0
p1
p0
s2
s1
s0
p1
p0
s2
s1
s0
p1
p0
s2
s1
s0
p1
p0
s1
s2
s0
p1
p0
s2
s1
s0
III-15