Difference between revisions of "GSWD"

From Intellivision Wiki
Jump to: navigation, search
m
m
Line 4: Line 4:
 
<tr><td>Mnemonic</td><td>GSWD</td></tr>
 
<tr><td>Mnemonic</td><td>GSWD</td></tr>
 
<tr><td>CP1610 Clock Cycles</td><td>6</td></tr>
 
<tr><td>CP1610 Clock Cycles</td><td>6</td></tr>
<tr><td>Interruptible</td><td>No</td></tr>
+
<tr><td>Interruptible</td><td>Yes</td></tr>
 
<tr><td>Opcode Range</td><td>$0030-$0033</td></tr>
 
<tr><td>Opcode Range</td><td>$0030-$0033</td></tr>
 
</table><br/>
 
</table><br/>
Line 20: Line 20:
 
After the GSWD instruction is executed, the specified register will contain the values of S, Z, O, and C in the format as follows.<br/>
 
After the GSWD instruction is executed, the specified register will contain the values of S, Z, O, and C in the format as follows.<br/>
  
     SZOC:0000:SZOC:0000<br/>
+
     szoc:0000:szoc:0000<br/>
 
     where:
 
     where:
         S   indicates the value of the [[Sign Flag]]
+
         s   indicates the value of the [[Sign Flag]]
         Z   indicates the value of the [[Zero Flag]]
+
         z   indicates the value of the [[Zero Flag]]
         O   indicates the value of the [[Overflow Flag]]
+
         o   indicates the value of the [[Overflow Flag]]
         C   indicates the value of the [[Carry Flag]]
+
         c   indicates the value of the [[Carry Flag]]

Revision as of 21:49, 11 January 2005

Instruction NameGet Status Word
MnemonicGSWD
CP1610 Clock Cycles6
InterruptibleYes
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.

   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