Xilinx UG129 Answering Machine User Manual


 
24 www.xilinx.com PicoBlaze 8-bit Embedded Microcontroller
UG129 (v1.1.2) June 24, 2008
Chapter 3: PicoBlaze Instruction Set
R
Processing Data
All data processing instructions operate on any of the 16 general-purpose registers. Only
the data processing instructions modify the ZERO or CARRY flags as appropriate for the
instruction. The data processing instructions consists of the following types:
Logic instructions
Arithmetic instructions
Test and Compare instructions
Shift and Rotate instructions
Logic Instructions
The logic instructions perform a bitwise logical AND, OR, or XOR between two operands.
The first operand is a register location. The second operand is either a register location or
a literal constant. Besides performing pure AND, OR, and XOR operations, the logic
instructions provide a means to:
complement or invert a register
clear a register
set or clear specific bits within a register
Bitwise AND, OR, XOR
All logic instructions are bitwise operations. The AND operation, illustrated in Figure 3-1,
shows that corresponding bit locations in both operands are logically ANDed together and
the result is placed back into register sX. If the resulting value in register sX is zero, then
the ZERO flag is set. The CARRY flag is always cleared by a logic instruction.
The OR and XOR instructions are similar to the AND instruction illustrated in Figure 3-1
except that they perform an OR or XOR logical operation, respectively.
See also:
“AND sX, Operand — Logical Bitwise AND Register sX with Operand,” page 93
“OR sX, Operand — Logical Bitwise OR Register sX with Operand,” page 103
“XOR sX, Operand — Logical Bitwise XOR Register sX with Operand,” page 118
Figure 3-1: Bitwise AND Instruction
AND sX, sY
AND sX, kk
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
Register sX
Register sY
Literal kk
UG129_c3_01_051204