OUTA, OUTB
Register: Output registers for 32-bit ports A and B.
DAT
< Label > < Condition > Instruction OUTA, SrcOperand < Effects >
DAT
< Label > < Condition Instruction > DestOperand, OUTA < Effects >
DAT
< Label > < Condition > Instruction OUTB, SrcOperand < Effects > (Reserved for future use)
DAT
< Label > < Condition > Instruction DestOperand, OUTB <Effects > (Reserved for future use)
Result: Optionally, the output 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. OUTA or OUTB may be used in either the assembly instruction's DestOperand or SrcOperand fields.
- SrcOperand is a constant expression used by Instruction to operate on, and optionally write to, the OUTA or OUTB register in DestOperand.
- DestOperand is a constant expression indicating the register that is operated on, and optionally written to, using the value of OUTA or OUTB in SrcOperand.
Explanation
OUTA and OUTB are one of six special purpose registers (DIRA, DIRB, INA, INB, OUTA and OUTB) that directly affect the I/O pins. The OUTA and OUTB register's bits indicate the output states of each of the 32 I/O pins in Port A and Port B, respectively. OUTB is reserved for future use; the Propeller P8X32A does not include Port B I/O pins so only OUTA is discussed below.
OUTA is a read/write register usable in an instruction's DestOperand or SrcOperand fields. If the I/O pin is set to output, a low (0) bit in OUTA causes it to output ground, and a high (1) bit causes it to output VDD (3.3 volts). The following code sets I/O pins P0 through P3 to output high.
mov dira, #$0F mov outa, #$0F
See Registers, and the Spin language OUTA, OUTB, for more information. Keep in mind that in Propeller Assembly, unlike in Spin, all 32 bits of OUTA are accessed at once unless the MUXx instructions are used.
Unless otherwise noted, content on this site is licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License.