Echelon Neuron Uživatelský manuál Strana 137

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 237
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 136
XCH (Exchange)
The XCH instruction exchanges the contents of TOS and NEXT on the data
stack. The XCH instruction uses the implicit addressing mode.
The XCH instruction applies to Series 3100, 5000, and 6000 devices.
Syntax:
The XCH instruction requires no operands:
XCH
Table 57 describes the attributes of the XCH instruction.
Table 57. XCH Instruction
Instruction Hexadecimal
Opcode
Instruction
Size (Bytes)
CPU Cycles
Required
Affect on
Carry Flag
XCH B6 1 4 None
Example:
The following example pushes two numbers onto the data stack, then exchanges
their positions on the stack.
pushs #3 ; (3, -, -)
pushs #2 ; (2, 3, -)
xch ; (3, 2, -)
Neuron Assembly Language Reference 127
Zobrazit stránku 136
1 2 ... 132 133 134 135 136 137 138 139 140 141 142 ... 236 237

Komentáře k této Příručce

Žádné komentáře