You are on page 1of 5

CSE 2006 – LAB ASSIGNMENT 7

Mridul Jadon

20BCE1734

Aim: To perform logical operation – XOR, Shifts – Left Shift, Right Shift.

Tool Used: Assembler - MASM 611

Algorithm:
(1) Logical operation (XOR)
Move one operand into the AX register.
Move next operand to register BX (optional for NOT).
XOR AX, BX performs bitwise XOR on the operands and stores it in AX.
HLT terminates the process.

Program:

Sample Input:
AX = 05H
BX = 06H
Sample Output:
XOR: AX = 0003
Register/ Memory Contents for I/O:

Sanpshot of Output:

2) Logical Shift: Program


SHL

Sample Input:
AX = 06H
Sample Output:
AX = 000C

Register/ Memory Contents for I/O:

Sanpshot of Output:
SHR

Sample Input:
AX = 06H

Sample Ouput:
0003

Register/ Memory Contents for I/O:


Snapshot of Output:

Result: The logical operations(XOR), shifting(SHL,SHR) were executed successfully using DOS
BOX using Assembler MASM611.

You might also like