From Intellivision Wiki
Jump to: navigation, search
Instruction NameGet Status Word
CP1610 Clock Cycles6
Opcode Range$0030-$0033

The Get Status Word (GSWD) instruction retrieves the Sign Flag, Zero Flag, Overflow Flag, and Carry Flag and places them into the register specified. The opcode format is as follows.

where: rr indicates the target register such that: rr == 00 indicates register R0 rr == 01 indicates register R1 rr == 10 indicates register R2 rr == 11 indicates register R3

After the GSWD instruction is executed, the specified register will contain the values of S, Z, O, and C in the format as follows.

where: s indicates the value of the Sign Flag z indicates the value of the Zero Flag o indicates the value of the Overflow Flag c indicates the value of the Carry Flag