Sign Flag

From Intellivision Wiki
Revision as of 09:25, 4 December 2010 by Mr z (talk | contribs) (Protected "Sign Flag" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Sign Flag (S), if set, indicates that the previous operation resulted in negative value, which is determined by a one (1) in bit 15 of the result. If clear, then the previous operation resulted in a positive value, determined by a zero (0) in bit 15 of the result. The behavior of the following opcodes is affected by the current value of the Sign Flag.

BMI
BPL
BGE
BGT
BLE
BLT
BUSC
BESC
GSWD

In addition to affecting the opcodes above, the Sign Flag is affected by the following opcodes.

INCR
DECR
COMR
NEGR
ADCR
RSWD*
SWAP*
SLL
RLC
SLLC
SLR*
SAR*
RRC*
SARC*
MOVR
ADDR
SUBR
CMPR
ANDR
XORR
ADD
ADD@
SUB
SUB@
CMP
CMP@
AND
AND@
XOR
XOR@

  • Indicates slight variation from normal Sign Flag behavior. See opcode documentation for more details.