Example 2:
mov A, BANK var
mov BP,A
mov A, OFFSET var
mov MP1,A
mov A,IAR1
·
Operator precedence
Precedence
Operators
1 (Highest)
2
3
4
5
6
7
8
9 (Lowest)
( ), [ ]
+,
-
(unary), LOW, MID, HIGH, OFFSET, BANK
*, /, %, SHL, SHR
+,
-
(binary)
> (greater than), >= (greater than or equal to),
< (less than), <= (less than or equal to)
== (equal to), != (not equal to)
! (bitwise NOT)
& (bitwise AND)
|(bitwise OR), ^(bitwise XOR)
Miscellaneous
Forward References
The Cross Assembler allows reference to labels, variable names, and other symbols before they
are declared in the source code (forward named references). But symbols to the right of
EQU
are
not allowed to be forward referenced.
Local Labels
A local label is a label with a fixed form such as $number. The number can be 0~29. The function of
a local label is the same as a label except that the local label can be used repeatedly. The local la-
bel should be used between any two consecutive labels and the same local label name may used
between other two consecutive labels. The Cross Assembler will transfer every local label into a
unique label before assembling the source file. At most 30 local labels can be defined between two
consecutive labels.
Example.
Label1:
; label
$1:
;; local label
mov a, 1
jmp $3
$2:
;; local label
mov a, 2
jmp $1
$3:
;; local label
jmp $2
Label2:
; label
jmp $1
$0:
;; local label
jmp Label1
$1:
jmp $0
Label3:
114
A/D Type MCU
Содержание HT46R22
Страница 7: ...vi A D Type MCU...
Страница 9: ...viii A D Type MCU...
Страница 10: ...P a r t I Microcontroller Profile Part I Microcontroller Profile 1...
Страница 11: ...2 A D Type MCU...
Страница 90: ...P a r t I I Programming Language Part II Programming Language 81...
Страница 91: ...82 A D Type MCU...
Страница 97: ...88 A D Type MCU...
Страница 128: ...P a r t I I I Development Tools Part III Development Tools 119...
Страница 129: ...120 A D Type MCU...
Страница 140: ...Appendix Appendix 131...
Страница 141: ...132 A D Type MCU...
Страница 151: ...142 A D Type MCU...
Страница 152: ...A p p e n d i x B Package Information Appendix B Package Information 143 B...
Страница 161: ...A D Type MCU...
Страница 162: ...Amendments...