CROSS ASSEMBLER ASM62XX

4.5.3Assembler control pseudo-instructionsEND
ENDTo 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 subroutine is more appropriate.

4.6.1Macro-instructions

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

Macro-

Mnemonic

 

 

 

 

 

Code

 

 

 

 

 

instruction

after expansion

11

10

9

8

7

6

5

4

3

2

1

0

JPM

ps

PSET

p

1

1

1

0

0

1

0

p4

p3

p2

p1

p0

 

 

JP

s

0

0

0

0

s7

s6

s5

s4

s3

s2

s1

s0

JPM

C,ps

PSET

p

1

1

1

0

0

1

0

p4

p3

p2

p1

p0

 

 

JP

C,s

0

0

1

0

s7

s6

s5

s4

s3

s2

s1

s0

JPM

NC,ps

PSWT

p

1

1

1

0

0

1

0

p4

p3

p2

p1

p0

 

 

JP

NC,s

0

0

1

1

s7

s6

s5

s4

s3

s2

s1

s0

JPM

Z,ps

PSET

p

1

1

1

0

0

1

0

p4

p3

p2

p1

p0

 

 

JP

Z,s

0

1

1

0

s7

s6

s5

s4

s3

s2

s1

s0

JPM

NZ,ps

PSET

p

1

1

1

0

0

1

0

p4

p3

p2

p1

p0

 

 

JP

NZ,s

0

1

1

1

s7

s6

s5

s4

s3

s2

s1

s0

CALLM

ps

PSET

p

1

1

1

0

0

1

0

p4

p3

p2

p1

p0

 

 

CALL

s

0

1

0

0

s7

s6

s5

s4

s3

s2

s1

s0

:

 

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

 

:

 

S1C62 FAMILY

EPSON

III-15

DEVELOPMENT TOOL REFERENCE MANUAL