@instruction<EOL><INDENT>def SAL(cpu, dest, src):<DEDENT>
OperandSize = dest.size<EOL>count = src.read()<EOL>countMask = {<NUM_LIT:8>: <NUM_LIT>,<EOL><NUM_LIT:16>: <NUM_LIT>,<EOL><NUM_LIT:32>: <NUM_LIT>,<EOL><NUM_LIT:64>: <NUM_LIT>}[OperandSize]<EOL>tempCount = Operators.ZEXTEND(count & countMask, dest.size)<EOL>tempDest = value = dest.read()<EOL>res = dest.write(Operators.ITEBV(dest.size, tempCount == <NUM_LIT:0>, tempDest, value << tempCount))<EOL>MASK = (<NUM_LIT:1> << OperandSize) - <NUM_LIT:1><EOL>SIGN_MASK = <NUM_LIT:1> << (OperandSize - <NUM_LIT:1>)<EOL>cpu.CF = Operators.OR(Operators.AND(tempCount == <NUM_LIT:0>, cpu.CF), Operators.AND(tempCount != <NUM_LIT:0>, (tempDest & (<NUM_LIT:1> << (OperandSize - tempCount)) != <NUM_LIT:0>)))<EOL>cpu.OF = Operators.ITE(tempCount != <NUM_LIT:0>, (cpu.CF) ^ (((res >> (OperandSize - <NUM_LIT:1>)) & <NUM_LIT>) == <NUM_LIT:1>), cpu.OF)<EOL>cpu.SF = Operators.OR(Operators.AND(tempCount == <NUM_LIT:0>, cpu.SF), Operators.AND(tempCount != <NUM_LIT:0>, (res & SIGN_MASK) != <NUM_LIT:0>))<EOL>cpu.ZF = Operators.OR(Operators.AND(tempCount == <NUM_LIT:0>, cpu.ZF), Operators.AND(tempCount != <NUM_LIT:0>, res == <NUM_LIT:0>))<EOL>cpu.PF = Operators.OR(Operators.AND(tempCount == <NUM_LIT:0>, cpu.PF), Operators.AND(tempCount != <NUM_LIT:0>, cpu._calculate_parity_flag(res)))<EOL>
The shift arithmetic left.

Shifts the bits in the first operand (destination operand) to the left or right by the number of bits specified in the
second operand (count operand). Bits shifted beyond the destination operand boundary are first shifted into the CF
flag, then discarded. At the end of the shift operation, the CF flag contains the last bit shifted out of the destination
operand.

:param cpu: current CPU.
:param dest: destination operand.
:param src: count operand.