Difference between revisions of "Sign Flag"

From Intellivision Wiki
Jump to: navigation, search
m
m (Protected "Sign Flag" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
 
(No difference)

Latest revision as of 09:25, 4 December 2010

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.