Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
15 views4 pages

Coal Lab 2

Uploaded by

chaudarysaad6009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

Coal Lab 2

Uploaded by

chaudarysaad6009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Computer Organization and Assembly Language-Lab Instructor: Munaza

Sher

Bahria University, Lahore Campus


Department of Computer Science
Lab Journal 02
(Fall 2023)

Computer Organization and Assembly Language-


Course: Lab Date: _______________
Course Code: CEL 325 Max Marks: 40
Faculty’s Name: Munaza Sher

Name: _____________________ Enroll No: ___________________ Class: ______________

Objective(s):
Upon completion of this lab session, learners will be able to:

1. In this lab, students will learn how to use instructions MOV, ADD, SUB, INC, DEC, and
NEG in an assembly language program.

Lab Tasks:

Task 1: Read the syntax of assembly language instructions MOV, ADD, SUB, INC, DEC, and
NEG (purpose, no. of operands required, and legal/illegal operands) from textbook ch#4. Also,
find out all valid combinations of MOV instructions using data register and immediate values or
both operands as data register.

Task 2: Now execute the following instructions (single-step) in EMU8086 and observe the
changes in contents of destination operand. If any instruction gives error, correct that error.
a. MOV AL, 256
b. MOV AX, F1ABh
c. MOV AX, -123
d. MOV BX, 123
e. MOV AH, 010010001b
f. MOV 1234h, BX
g. MOV DX, 33h
h. MOV CX, ‘AB’
i. MOV CH, AL
Computer Organization and Assembly Language-Lab Instructor: Munaza
Sher
j. MOV DL, BL
k. MOV AH, BL
l. MOV AX, CL
Task 3: For each of the following assembly language instructions, what will be the possible
register value (in hex)? Assume all statements are being executed in a sequence and initially all
registers contain zero.

No. Instructions AX BX CX DX
AH AL BH BL CH CL DH DL
1. MOV AX, 0110b
2. MOV BH, 90H
3. MOV CX, 10
4. MOV DX, 1234H
5. ADD DH, DL
6. ADD AX, BX
7. SUB CX, BX
8. SUB AH, DL
9. INC AX
10. INC BL
11. DEC DX
12. DEC CH
13. NEG CX
14. NEG BL

Task 4: Execute following statements (single-step) in EMU8086. Observe changes in the


contents of destination operand.
No Code Snippet Result
.
A. MOV AX, 4D12h

MOV BX, 1C21h


ADD AX, BX
B. MOV AX, 4D12h
MOV BX, 1C21h
SUB AX, BX
Computer Organization and Assembly Language-Lab Instructor: Munaza
Sher
C. MOV AL, 25
MOV BH, 1Ch
ADD AL, BH
D. MOV CL, 10000011b
MOV CH, 10010010b
SUB CH, CL
E. MOV AX, 80h
ADD AX, 01
F. MOV AL, 80h
ADD AL, 01
G. MOV AL, 0A5h
MOV BL, 12h
ADD AL, BL
MOV DH, BL
SUB DH, 10

Lab Grading Sheet :

Max
Obtained
Task Mark Comments(if any)
Marks
s

1. 10

2. 10

3. 10

4. 10
Computer Organization and Assembly Language-Lab Instructor: Munaza
Sher

Total 40 Signature

Note : Attempt all tasks and get them checked by your Lab Instructor

You might also like