Shla (shift left arithmetically) – Echelon Neuron User Manual
Page 132

SHLA (Shift Left Arithmetically)
The SHLA instruction shifts the byte in TOS one bit to the left arithmetically.
The SHLA instruction uses the implicit addressing mode. This instruction
moves a zero into bit 0 of TOS, and stores bit 7 in the Carry flag.
Figure 12 shows the operation of the SHLA instruction.
TOS
7
0
0
C
Figure 12. The SHLA Instruction
The SHLA instruction applies to Series 3100, 5000, and 6000 devices.
Syntax:
The SHLA instruction requires no operands:
SHLA
Table 53 describes the attributes of the SHLA instruction.
Table 53. SHLA Instruction
Instruction
Hexadecimal
Opcode
Instruction
Size (Bytes)
CPU Cycles
Required
Affect on
Carry Flag
SHLA
30
1
2
Modified
Example:
The following example pushes the number 150 (h’96) onto the data stack, and
then uses the SHLA instruction to shift the TOS value left arithmetically. After
the SHLA instruction completes, TOS has the value 44 (h’2C) and the Carry flag
is set to 1 (the previous value of bit 7 in TOS).
push #d’150 ; ( d’150, -- )
shla ; ( d’44, -- )
122
Neuron Assembly Language Instruction Statements