PHSA, PHSB

Register: Counter A and Counter B phase registers. 

DAT
Label > Condition > Instruction PHSASrcOperand Effects >


DAT
Label > Condition > Instruction DestOperandPHSA Effects >


DAT
Label > Condition > Instruction PHSBSrcOperand Effects >


DAT
Label > Condition > Instruction DestOperandPHSB Effects >


Result: Optionally, the counter phase register is updated.

  • Label is an optional statement label. See Common Syntax Elements.
  • Condition is an optional execution condition. See Common Syntax Elements.
  • Instruction is the desired assembly instruction. PHSA and PHSB are read/write pseudo- registers that act differently in the SrcOperand than they do in the DestOperand.
  • SrcOperand is a constant expression used by Instruction to operate on, and optionally write to, the PHSA or PHSB register in DestOperand.
  • DestOperand is a constant expression indicating the register that is operated on, and optionally written to, using the value of PHSA or PHSB in SrcOperand.

Explanation

PHSA and PHSB are two of six registers (CTRACTRBFRQAFRQBPHSA, and PHSB) that affect the behavior of a cog's Counter Modules. Each cog has two identical counter modules (A and B) that can perform many repetitive tasks. The PHSA and PHSB registers contain the accumulations of the FRQA and FRQB registers' value, respectively, according to the corresponding counter's mode and input stimulus.

See the Spin language CTRA, CTRB section for more information.

PHSA and PHSB are read/write pseudo-registers. In the SrcOperand they read the counter's accumulator value. In the DestOperand they read the shadow register whose address PHSA or PHSB occupies, but modifications affect both the shadow and accumulator registers.

The following code moves the value of PHSA into Result. See Registers, and the Spin language PHSA, PHSB, for more information.

mov    Result, phsa    'Get current phase value

Unless otherwise noted, content on this site is licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License.