
Microprocessor Lab Experiment No. (2)
Data Transfer Instructions
logical instructions
MASM and LINKER
Objective:-
A. To Learn how to use data transfer instructions.
B. To Learn how to use logical instructions.
C. To learn how to write a program in assembly language, convert it to an
executable ( .exe) form then execute it using DEBUG.
Equipments:-
PC
Procedure:-
A.
write the instructions using (A) command , then execute them step by
step using ( T ) command.
a) -R
b) -A 100
c) XXXX:0100
MOV CX,1122 CX=.. ..
d) XXXX:010X
MOV AX,3344 AX=.. ..
e) XXXX:010X
XCHG CL,AH AX=.. .. , CX=.. ..
f) XXXX:010X
MOV BX,10 BX=.. ..
g) XXXX:010X
MOV DI,200 DI=.. ..
h) –T=100 5
B.
Find The Contents Of AL at Each Step of the Following:
a) XXXX:0100 MOV
AL,55h
AL= . . . . . . . . . . . . . . .
b) XXXX:010X AND
AL,1Fh
AL= . . . . . . . . . . . . . .
c) XXXX:010X OR
AL,C0h
AL= . . . . . . . . . . . . . . .
d) XXXX:010X XOR
AL,0Fh
AL= . . . . . . . . . . . . . . .
e) XXXX:010X NOT
AL
AL= . . . . . . . . . . . . . . .

C.
1. Use NOTEPAD application program to write the following sample
program:
code segment
assume cs:code
start: mov ax,code
mov ds,ax
code ends
end start
2.
Save (filename.asm) using the name in c:\8086 then close
NOTEPAD.
3. You should copy (M.exe) to c:\8086 folder.
4. Open DOS window by DOSBOX icon. Then Enter the following
Command:
Z:\ > MOUNT C C:\8086 <ENTER>
Z:\ > C: <ENTER>
C:\>M (filename.asm)

a) Press enter to open the open (file.asm) in DOS window
b) Use F5 to find error (debugging) and Fix The Errors
c) Use F8 To Save & Quit

5. Convert (filename.asm) to (filename.obj) using (MASM file
name.asm) from DOS prompt.
6. If there were no error messages convert (filename.obj) to
(filename
.exe) using (LINK
filename
.obj).
7. Display all types have been creating during the above steps using the
command :
C:\>dir filename.*

8. Then unassembled the .exe file using the command:
C:\>Debug (filename.exe)
-u <ENTER>