GSWD

From Intellivision Wiki
Revision as of 21:05, 11 January 2005 by Pingaso (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 format of this opcode is as follows.

   0000:0000:0011:00rr
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.

   SZOC:0000:SZOC:0000
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