English
Language : 

EM73362 Datasheet, PDF (9/40 Pages) ELAN Microelectronics Corp – 4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
EM73362
4-BIT MICRO-CONTROLLER FOR LCD PRODUCT
a. SF is initiated to "1" for reset condition.
b. Branch instruction is decided by SF, when SF=1, branch condition will be satisified, otherwise,
branch condition will not be satisified by SF = 0.
(4) General Flag ( GF )
GF is a one bit general purpose register which can be set, clear, test by instruction SGF, CGF and TGS.
PROGRAM EXAMPLE :
Check following arithematic operation for CF, ZF, SF
CF ZF
SF
LDIA #00h;
-
1
1
LDIA #03h;
-
0
1
ADDA #05h;
-
0
1
ADDA #0Dh;
-
0
0
ADDA #0Eh;
-
0
0
ALU
The arithematic operation of 4 - bit data is performed in ALU unit. There are 2 flags can be affected by
the result of ALU operation, ZF and SF. The operation of ALU can be affected by CF only.
ALU STRUCTURE
ALU supported user arithematic operation function, including : addition, subtraction and rotaion.
DATA BUS
ALU
ZF CF SF GF
ALU FUNCTION
(1) Addition:
For instruction ADDAM, ADCAM, ADDM #k, ADD #k,y .... ALU supports addition function.
The addition operation can affect CF and ZF. For addition operation, if the result is "0", ZF will be "1",
otherwise, not equal "0", ZF will be "0". When the addition operation has a carry-out, CF will be "1",
otherwise, CF will be "0".
EXAMPLE:
Operation
3+4=7
7+F=6
0+0=0
8+8=0
(2) Subtraction:
Carry Zero
0
0
1
0
0
1
1
1
For instruction SUBM #k, SUBA #k, SBCAM, DECM... ALU supports user subtraction function. The
subtraction operation can affect CF and ZF, For subtraction operation, if the result is negative, CF will
* This specification are subject to be changed without notice.
10.8.2001 9