ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
89
Assembler Directives
5.13
Conditional Source
IF, ELSE, ENDIF
All source lines between the
IF
and
ENDIF
(or
IF
and
ELSE
) directives are assembled if the condi-
tion is true. These statements can be nested.
ELSE
delineates a “not true” action for a previous
IF
directive.
ENDIF
finishes a section of conditional assembly that began with an
IF
directive.
Directive
Arguments
IF
ELSE
ENDIF
value
Example:
Sections of the source code are conditional.
Cond1: EQU 1
Cond2: EQU 0
ORG 1000h
IF (Cond1)
ADD A, 33h
IF (Cond2)
ADD A, FFh
ENDIF ;Cond1
NOP ;Cond1
ELSE
MOV A, FFh
ENDIF ;Cond2
// The example creates the following code
ADD A, 33h
NOP
Содержание PSoC DESIGNER ImageCraft M8C
Страница 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Страница 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Страница 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Страница 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Страница 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Страница 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Страница 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...