Chapter 3 Creating and Editing Screens 
3.14.3.2 Logical Operation 
 
There are six logical operations which include OR, AND, XOR, NOT, Shift-left and 
Shift-right. There are three operands for each operation and each operand can be 
internal memory or constant, but it is internal memory only when outputting. The unit 
can be Word and Double Word. 
 
  | (Logical OR operation) 
Equation 
Var1 = Var2 | Var3 
 
Explanation 
Perform the logical OR operation on Var2 and Var3, and save the result of this 
calculation in Var1.   
 
Remark 
  The calculation result can be stored as WORD and DWORD. 
  Var1 can be internal memory only. Var2 and Var3 can be internal memory or 
constant. 
 
Example 
Perform the logical OR operation on $0 and $1, and save the result in $2 (this is an 
operation of unsigned 16-bit data) 
 
$2 = $0 | $1 Store the result of $2. $0 = F000H, $1 = 0F00H, then $2 = FF00H.   
Perform the logical OR operation on $3 and $5, and save the result in $7 (this is an 
operation of unsigned 32-bit data) 
Revision May, 2010      3-321