Echelon Neuron Bedienungsanleitung Seite 94

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 237
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 93
DEC (Decrement)
The DEC instruction decrements the TOS value. The DEC instruction uses the
implicit addressing mode. If the TOS value is zero prior to the decrement, this
instruction sets the Carry flag.
The DEC instruction applies to both Series 3100, 5000, and 6000 devices.
Syntax:
The DEC instruction requires no operands:
DEC
Table 28 describes the attributes of the DEC instruction.
Table 28. DEC Instruction
Instruction Hexadecimal
Opcode
Instruction
Size (Bytes)
CPU Cycles
Required
Affect on
Carry Flag
DEC 3F 1 2 Modified
Example:
The following example calls assumes that TOS contains a loop-control variable.
The DEC instruction decrements TOS. When TOS becomes zero, the BRZ
instruction branches to the Done label. As long as TOS is not zero, the BR
instruction branches to the Loop label. Thus, this example implements a for
loop construct.
Loop ... ; loop body
dec ; ( n )
brz Done
br Loop
Done ...
ret ; return to caller
84 Neuron Assembly Language Instruction Statements
Seitenansicht 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 ... 236 237

Kommentare zu diesen Handbüchern

Keine Kommentare