What does ASL mean?
| Meaning | Arithmetic Shift Left |
|---|---|
| Category | Technology & computing |
| Type | Code |
The instruction mnemonic ASL means Arithmetic Shift Left in assembly code for the HCS12 processor. It shifts the selected value left by one bit. The byte examples here use the HCS12 rules rather than assuming every processor has identical flags.
Keep the width and the shifted-out bit visible. For the documented HCS12 byte operation, the low bit becomes zero and the old high bit goes into carry. The result keeps eight bits. N reflects the result’s high bit, Z indicates a zero result, and V is N exclusive-OR C. Our original example starts with 01000001, decimal 65. Shifting left produces 10000010, unsigned 130: C is 0 and N is 1, so V is 1. The stored bits can be read as unsigned 130 or signed negative 126; the signed result no longer represents twice positive 65. In a second example, 10000000 shifts to 00000000 with carry 1. A zero stored result therefore does not imply that every original bit was zero. The manual treats ASL and LSL as equivalent left-shift operations for this architecture. This guide practises byte results and the named flags; it does not run a processor, predict cycles or extend these flag rules to another CPU. Try a different input byte in the demonstration. It displays both number interpretations and flags while retaining the eight-bit width; it does not treat the stored result as an unlimited-precision multiplication.

Meaning in context
- Arithmetic Shift Left
- The HCS12 instruction meaning; the documented operation shifts left once and inserts zero at the low end.
- Result and flags
- The byte retains eight bits. Carry records the old high bit; HCS12 overflow uses N exclusive-OR C.
Practical examples
Keep the outgoing bit
- Before
Original HCS12 byte exercise: 10000000 shifted left once. Draft: the result is zero, so nothing happened.
- After
Stored result: 00000000. Carry: 1, from the original high bit.
The stored byte and outgoing bit report different parts of the operation.
Separate signed and unsigned readings
- Before
Original exercise: 01000001 becomes 10000010. Draft: signed positive 65 doubled to signed positive 130 in an eight-bit result.
- After
The result bits represent unsigned 130 or signed negative 126. HCS12 V is 1 because N is 1 and C is 0.
The signed interpretation overflows the eight-bit range. The bit pattern alone does not choose the intended signedness.
Original illustrative examples, not quotations or reports of actual events.
Read an HCS12 byte shift
How can an ASL byte result be zero while carry is one?
See all guidance
Track the width
Write all eight input and output bits.
10000000 becomes 00000000 after the low zero enters.
Track carry
Read C from the input high bit.
The outgoing 1 becomes carry in that example.
Track overflow
Apply the named architecture’s flag rule.
For HCS12, V is N exclusive-OR C.
Track the eight-bit result and carry separately, then interpret signed overflow using the stated HCS12 rules.
Help improve this entry
Spot a mistake or have a clearer example? Suggest a change.
By AcronymIndex Editorial Team · Editorial policy