CHAPTER 4: ASSEMBLER
S5U1C63000A MANUAL
EPSON
59
(S1C63 FAMILY ASSEMBLER PACKAGE)
Relational operators
Examples
==
Equal
SW==0
!=
Not equal
SW!=0
<
Less than
ABC<5
<=
Less than or equal
ABC<=5
>
Greater than
ABC>5
>=
Greater than or equal
ABC>=5
&&
AND
ABC&&0xf
||
OR
ABC||0b1010
The relational operator returns 1 if the expression is true, otherwise it returns 0.
Priority
The operators have the priority shown below. If there are two or more operators with the same
priority in an expression, the assembler calculates the expression from the left.
1. ( )
High priority
2. + (plus sign), - (minus sign), ~
↑
3. ^H, ^L
4.
*
, /, % (%%)
5. + (addition), - (subtraction)
6. <<, >>
7. ==, !=, <, <=, >, >=
8. &
9. ^
10. |
11. &&
↓
12. ||
Low priority
Examples
#defnum BLK_HEADER_SIZE 4
#defnum BLK_START 0x30+BLK_HEADER_SIZE*2
#defnum BLK_END BL4*2
#macro
ADD_X
ADDR
ldb
%ext,(ADDR*2)^H
... Can be used in macros.
add
%x,(ADDR*2)^L
#endm
ldb
%ext,BLK_START^H
; %x=BLK_START
ldb
%xl, BLK_START^L
ld
[%x],0b11&0x110
ldb
%ext, ~BLK_END^H
; cmp %x, BLK_END
cmp
%x, BLK_END^L
ADD_X
(0x34)*2
; %x+=0x1234*2
Содержание S5U1C63000A
Страница 1: ...MF910 06 CMOS 4 BIT SINGLE CHIP MICROCOMPUTER S1C63 Family Assembler Package S5U1C63000A Manual ...
Страница 4: ......
Страница 14: ......
Страница 304: ......
Страница 305: ...S1C63 Family Assembler Package Quick Reference ...