# Sign Flag

### From Intellivision Wiki

(Difference between revisions)

m |
|||

Line 1: | Line 1: | ||

[[Category:CP1610]] | [[Category:CP1610]] | ||

- | 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 | + | 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.<br/> |

<br/> | <br/> | ||

[[BMI]]<br/> | [[BMI]]<br/> |

## Revision as of 01:08, 12 January 2005

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.