Everything

.endm


Instructs the assembler to terminate the execution of a series of statements defined as the functions of the macro.

[Syntax]

Symbol field

Mnemonic field

Operand field

Comment field

 
.endm
 
[; comment]

[Function]

-

The .endm directive instructs the assembler to terminate the execution of a series of statements defined as the functions of the macro.

[Use]

-

The .endm directive must always be described at the end of a series of statements following the .macro, .rept, and/or the .irp directives.

[Description]

-

A series of statements described between the .macro directive and .endm directive becomes a macro body.

-

A series of statements described between the .rept directive and .endm directive becomes a REPT-ENDM block.

-

A series of statements described between the .irp directive and .endm directive becomes an IRP-ENDM block.

-

If the .macro, .rept, or .irp directive corresponding to this directive does not exist, the assembler outputs the message then stops assembling.

[Example]

(1)

MACRO-ENDM

ADMAC   .macro  PARA1, PARA2
                mov     PARA1, r12
                add     PARA2, r12
        .endm

(2)

REPT-ENDM

.rept   3
        add  1, r15
        sub  r15, r16
.endm

(3)

IRP-ENDM

.irp    PARA 1, 2, 3
        add     PARA, r10
        st.w    r10, [r20]
.endm