R
Appendix : PicoBlaze Instruction Set and Event Reference
Pseudocode
sX Å (sX – Operand) mod 256; always an
if ( (sX – Operand) < 0 ) then
CARRY Å 1 else
CARRY Å 0 endif
if ( (sX - Operand) = 0 ) then
ZERO Å 1 else
ZERO Å 0 endif
PC Å PC + 1
Registers/Flags Altered
Registers: sX, PC
Flags: CARRY, ZERO
SUBCY sX, Operand
The SUBCY instruction performs an
| Register sY or |
| Literal kk |
Borrow | Borrow In |
CARRY | Register sX |
| UG129_aC_04_051604 |
Figure C-10: SUBCY Instruction
Examples
Operand is a register location, sY, or an immediate
SUBCY sX, sY; Subtract register. sX = sX - sY - CARRY
SUBCY sX, kk; Subtract immediate. sX = sX - kk - CARRY
114 | www.xilinx.com | PicoBlaze |
UG129 (v1.1.2) June 24, 2008