Left Shift Operation – Assembly Program


Write and run a program using 8086 assembly language that reads an 8-bit value stored in a memory location into AL register, then left shifts the content of AL register and finally stores the result back in the memory location from which it was read. [Dec 2015, Set-1]

DATA SEGMENT
    NUM DB 5H
DATA ENDS

CODE SEGMENT
START:

    ASSUME CS:CODE, DS:DATA 
    MOV AX, DATA
    MOV DS, AX

    MOV AL, NUM   
    SHL AL, 1
    MOV NUM, AL
    
    MOV AX, 4C00H
    INT 21H  
      
CODE ENDS

END START