Epson S5U1C63000A User Manual page 73

Cmos 4-bit single chip microcomputer manual
Table of Contents

Advertisement

Relational operators
Equal
==
!=
Not equal
Less than
<
<=
Less than or equal
Greater than
>
>=
Greater than or equal
&&
AND
||
OR
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. ( )
2. + (plus sign), - (minus sign), ~
3. ^H, ^L
4. *, /, % (%%)
5. + (addition), - (subtraction)
6. <<, >>
7. ==, !=, <, <=, >, >=
8. &
9. ^
10. |
11. &&
12. ||
Examples
#defnum BLK_HEADER_SIZE
#defnum BLK_START
#defnum BLK_END
#macro
ADD_X
ldb
add
#endm
ldb
ldb
ld
ldb
cmp
ADD_X
S5U1C63000A MANUAL
(S1C63 FAMILY ASSEMBLER PACKAGE)
Examples
SW==0
SW!=0
ABC<5
ABC<=5
ABC>5
ABC>=5
ABC&&0xf
ABC||0b1010
High priority
Low priority
4
0x30+BLK_HEADER_SIZE*2
BLK_START+4*2
ADDR
%ext,(ADDR*2)^H
%x,(ADDR*2)^L
%ext,BLK_START^H
%xl, BLK_START^L
[%x],0b11&0x110
%ext, ~BLK_END^H
%x,
BLK_END^L
(0x1200+0x34)*2
... Can be used in macros.
; %x=BLK_START
; cmp %x, BLK_END
; %x+=0x1234*2
EPSON
CHAPTER 4: ASSEMBLER
59

Advertisement

Table of Contents
loading

Table of Contents