Echelon Neuron Bedienungsanleitung Seite 122

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 237
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 121
ROLC (Rotate Left through Carry)
The ROLC instruction rotates the byte in TOS one bit to the left, using the Carry
flag as an input bit. The ROLC instruction uses the implicit addressing mode.
Bit 0 is loaded from the Carry flag. After the operation completes, the Carry flag
contains the value from bit 7.
Figure 9 shows the operation of the ROLC instruction.
TOS
7 0
C
Figure 9. The ROLC Instruction
The ROLC instruction applies to Series 3100, 5000, and 6000 devices.
Syntax:
The ROLC instruction requires no operands:
ROLC
Table 46 describes the attributes of the ROLC instruction.
Table 46. ROLC Instruction
Instruction Hexadecimal
Opcode
Instruction
Size (Bytes)
CPU Cycles
Required
Affect on
Carry Flag
ROLC 39 1 2 Used, modified
Example:
The following example pushes the number 150 (h’96) onto the data stack, and
then uses the ROLC instruction to rotate the TOS value left through the Carry
flag. This example assumes that the Carry flag is not set (has value 0). After the
ROLC instruction completes, TOS has the value 44 (h’2C) and the Carry flag is
set (has value 1 from bit 7 of the original h’96 in TOS).
push #d’150 ; ( d’150, -- )
rolc ; ( d’44, -- )
112 Neuron Assembly Language Instruction Statements
Seitenansicht 121
1 2 ... 117 118 119 120 121 122 123 124 125 126 127 ... 236 237

Kommentare zu diesen Handbüchern

Keine Kommentare