LCD Type MCU
Example 2:
mov A, BANK var
mov BP,A
mov A, OFFSET var
mov MP1,A
mov A,IAR1
·
Operator precedence
Precedence
1 (Highest)
2
3
4
5
6
7
8
9 (Lowest)
Operators
( ), [ ]
+,
-
(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:
150
Home Index Bookmark Pages Text
Previous Next
Pages: Home Index