ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
27
ImageCraft Assembler
Global Labels.
These are defined by the
EXPORT
assembler directive or by ending the label with
two colons “
::
” rather than one. Global labels may be referenced from any source file in a project.
The following example has two global labels. The
EXPORT
directive is used to make the
SubFun
label global, while two colons are used to make the
MoreFun
label global. Global labels are case
sensitive.
Re-usable Local Labels.
These have multiple independent definitions within a single source file.
They are defined by preceding the label string with a period “
.
”. The scope of a local label is
bounded by the nearest local, or global label or the end of the source file. The following example has
a single global label called
SubFun
and a re-usable local label called
.MoreFun
. Notice that while
labels do not include the colon when referenced, re-usable local labels require that a period precede
the label string for all instances. Re-usable local labels are case sensitive.
3.1.2
Mnemonics
An instruction mnemonic is a two to five letter string that represents one of the microcontroller
instructions. All mnemonics are defined in the
“Instruction Set Summary” on page 14
. There can be
0 or 1 mnemonics per line of a source file. Mnemonics are not case sensitive.
Global Labels:
EXPORT SubFun
mov
X, 10
SubFun:
xor
reg[00h], FFh
dec
X
jnz
SubFun
mov
X, 5
MoreFun::
xor
reg[00h], FFh
dec
X
jnz
MoreFun
Re-usable Local
Label:
EXPORT SubFun
mov
X, 10
SubFun:
xor
reg[00h], FFh
mov
A, 5
.MoreFun:
xor
reg[04h], FFh
dec
A
jnz
.MoreFun
dec
X
jnz
SubFun
Local labels with the same name but in different source files is not supported.
Summary of Contents for PSoC DESIGNER ImageCraft M8C
Page 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Page 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Page 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Page 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Page 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Page 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Page 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...