User manual

Assembler directives ST Assembler-Linker
62/89 Doc ID 11392 Rev 4
Table 36. #ELSE
Purpose Conditional ELSE.
Format #ELSE
Description
Forces execution of the statements until the next #ENDIF if the last #IF statement was
found false or disables execution of the statements until the next #ENDIF if the last #IF
statement was found true.
The #ELSE is optional in #IF / #ENDIF structures. In case of nested #ELSE
statements, a #ELSE refers to the last #IF.
Example
#IF{1eq0} ;
; block A ... not assembled
#ELSE
; block B ... assembled
#ENDIF
See also #IF, #ENDIF
Table 37. #ENDIF
Purpose Conditional terminator.
Format #ENDIF
Description
This is the non optional terminator of a #IF structure. If there is only one level of #IF
nesting in force, then the statements after this directive will never be ignored, no
matter what the result of the previous #IF was. In other words, the #ENDIF ends the
capability of the previous #IF to suppress assembly. When used in a nested situation it
does the same job, but if the last #IF / #ENDIF structure was in a block of source
suppressed by a previous #IF still in force, the whole of the last #IF / #ENDIF structure
will be ignored no matter what the result of the previous #IF was.
Example
#IF {count gt 0}
...
#ENDIF
See also #IF, #ELSE
Table 38. FAR (STM8 only)
Purpose
Specifies to debuggers that the return address in the stack for functions using this
directive is written over three bytes.
Format FAR <"string">
Description
This directive is used with functions called by CALLF, whose return stack address
spans three bytes. Every function called by CALLF must be classified as FAR. This
directive is for use with the STM7 Assembler only.
Example
PUBLIC func
FAR func
func retf
See also NEAR, INTERRUPT