Echelon Neuron Manual do Utilizador Página 131

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 237
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 130
SHL (Shift Left)
The SHL instruction shifts the byte in TOS one bit to the left. The SHL
instruction uses the implicit addressing mode. This instruction moves a zero into
bit 0 of TOS, and discards bit 7. This instruction also clears the Carry flag.
Figure 11 shows the operation of the SHL instruction.
TOS
7 0
0
0
C
Figure 11. The SHL Instruction
The SHL instruction applies to Series 3100, 5000, and 6000 devices.
Syntax:
The SHL instruction requires no operands:
SHL
Table 52 describes the attributes of the SHL instruction.
Table 52. SHL Instruction
Instruction Hexadecimal
Opcode
Instruction
Size (Bytes)
CPU Cycles
Required
Affect on
Carry Flag
SHL 3B 1 2 Cleared
Example:
The following example pushes the number 150 (h’96) onto the data stack, and
then uses the SHL instruction to shift the TOS value left. After the SHL
instruction completes, TOS has the value 44 (h’2C) and the Carry flag is cleared.
push #d’150 ; ( d’150, -- )
shl ; ( d’44, -- )
Neuron Assembly Language Reference 121
Vista de página 130
1 2 ... 126 127 128 129 130 131 132 133 134 135 136 ... 236 237

Comentários a estes Manuais

Sem comentários