Assembly Language Programming Tutorial – 45 – SHL Instruction

All references in this video came from:
Assembly Language for x86 Processors (6th Edition)

Brought to you by

The Rasmurtech Community:

Rasim from give us another tutorial on Assembly Language Programming . In this tutorial Rasim shows us how to use the SHL Instruction.



Binary to Decimal to Hexadecimal Converter:


Wiki Answsers: Explain 8086 flag register

Google Plus:





n o i d says:


ayush gupta says:

hey, why did you not make a rol,ror,rcr and rcl instruction video? 🙁

Umair Hussain says:

watched all your, SHL,SHR,SAL & SAR tuts, thank you
and you could also add the ROL,ROR,RCR & RCL instructions video 🙂

Tails8521 says:

Just a detail I want to add about SHL and all the similar shift operations like SHR, ROL, ROR… it can only take the value 1 or the CL register as second operand, at 5:40, you can see that the assembler corrected “shl ax, 2” into 2 lines of “shl ax, 1”, with some others developpement environements, it can prevent the program from assembling with an invalid inscruction operand because there is no x86 opcode for a shift with immediate value other than 1, so that’s good to know.
If you face that problem, just add the instruction several times or use the CL register.

darkaxe201 says:

In what case would the SHL instruction be useful?

Waqar Mughal says:

when i code like this, this gives an error

error: improper operand type

mov ax,1
shl ax,2

mov dx,ax
mov ah,2
int 21h

Hopewell Ngcongo says:

wow real help full video bra thanks

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!