Xilinx UG129 Answering Machine User Manual


 
PicoBlaze 8-bit Embedded Microcontroller www.xilinx.com 113
UG129 (v1.1.2) June 24, 2008
SUB sX, Operand —Subtract Operand from Register sX
R
The STORE instruction is only supported on PicoBlaze microcontrollers for Spartan-3,
Virtex-II, and Virtex-II Pro FPGAs.
SUB sX, Operand —Subtract Operand from Register sX
The SUB instruction performs an 8-bit subtraction of two operands, as shown in
Figure C-9. The first operand is any register, which also receives the result of the operation.
The second operand is also any register or an 8-bit constant value. Flags are affected by this
operation. The SUB instruction does not use the CARRY as an input, and therefore there is
no need to condition the flags before use.
The CARRY flag, when set, indicates when an underflow (borrow) occurred.
Examples
Operand is a register location, sY, or an immediate byte-wide constant, kk.
SUB sX, sY; Subtract register. sX = sX - sY.
SUB sX, kk; Subtract immediate. sX = sX - kk.
Description
Operand is subtracted from register sX. The ZERO and CARRY flags are set appropriately.
KCPSM3 Instruction PBlazIDE Instruction
STORE sX, (sY) STORE sX, sY
Figure C-9: SUB Instruction
Borrow
UG129_aC_03_051604
Register sX
Register sY or
Literal kk
CARRY