Lab Manual
Lab Manual
Laboratory Manual
1
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
1
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Objectives
Question (1): What are the four basic functions of performed by the computer?
1-
2-
3-
4-
(c) The process of producing results from the data for getting useful information is
called?
(i) Output (ii) input (iii) processing (iv) storage
2
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Question (3):
Question (5): What is CPU and how does it work? Explain briefly?
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Question (6): What are the four basic functions performed by the computer?
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
3
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Objectives
Identify the ports computer and their working.
Explain the importance types of memory and ports.
Question (1): Fill the tables below by write the suitable ports?
A):
B)
C(
4
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Question (3):
5
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Objectives
Identify the components computer and their functions.
Explain the importance types of mother board.
6
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
(a) .................. unit coordinates the activities of all the other units in
The system.
1-
2-
7
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Question (6):
b- Why is it necessary?
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
a- Sound Card
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
8
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Objectives
Review and explain the importance types of numbering systems types.
Explain the basic operations performed on numbers.
Question (1): find the 1st and 2nd complement of the following decimal values?
a) 154
b) – 413
Question (2):
9
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Question (3):
Question (4):
I-Subtract 010011112 to 011000112 using signed-magnitude arithmetic
II-Subtract 011000112 (99) from 010011112 (79) using signed magnitude arithmetic
Question (5):
III-Express 2310, –2310, and –910 in 8-bit binary two's complement forms.
Question (7):
(a) The 2s complement of (01010)2 is
11
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
1-
2-
3-
1-
2-
3-
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
11
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Objectives
Explain Loading the DEBUG Program.
Part 1:
Start Emu8086 by selecting its icon from the start menu, or by running
Emu8086.exe.
2. Select "Samples" from "File" menu.
3. Click [Compile and Emulate] button (or press F5 hot key).
4. Click [Single Step] button (or press F8 hot key), and watch how the cod
is being executed.
5. Try opening other samples, all samples are heavily commented, so it's a
great learning tool.
1. Use the REGISTER command to display the current contents of all of the
80x86's internal registers. List the initial values held in CS, DS, and SS.
_____________ ,_____________ ,______________
12
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
1- XCHG AH,BL
2- XCHG AX,WORD
1-MOV DS,1000
2- MOV DS,ES
13
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Objectives
Identify Assembly basic Instructions
ADD,SUB
1- A= 5 – A
1- A=B-2*A
14
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Objectives
SUB,DIV,DEC,INC
A- MOV DH,41H
ADD DH,3
B- MOV AL , 6
MOV CL , 8
ADD AL , CL
CL=2*AL+BL
15
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
MOV AL , 8
MOV CL , 6
SUB AL , CL
120/12H
16
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Question (1) : Encode each of the instructions that follow into machine code.
a. MOVAX,BX _______________
b. MOV AX, OAAAA _______________
c. MOV AX, [BX] _______________
d. MOV AX, [0004] _______________
e. MOV AX, [BX + SI] _______________
f. MOV AX, [SI+4] _______________
g. MOV AX, [BX + SI +4] _______________
MOV AX, 5 ;
ADD AX, 3 ;,
INC AX ;
DEC AX ;
SUB AX, 6 ;
17
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Question (1)
Procedure
1. Initialize the internal registers of the 80x86 as follows:
(AX) = 0000H (BX) =
0001H
MOV AX, BX
MOV AX, OAAAA
MOV AX, [BX]
MOV AX, [4]
ADD AX, BX
18
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Addressing Physical
Instruction AX Function
Mode Address
a
b
c
d
e
f
19
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Question (1) Write a program to add two numbers of length 16 bits stored in
memory in positions 02000h, 0202h?
Question (2): Suppose AL= 35H BL= 39H write program to add the numbers and
correct the result?
21
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
A B A+B
1 1
1 0
0 1
0 0
Question (2) : find the value of registers OR AL , BL ,suppose AL= 2FH, BL=52H
?
AL
BL
OR AL,BL
A B A.B
1 1
1 0
0 1
0 0
21
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
Question (4): find the value of registers AND AL , BL ,suppose AL= 27H,
BL=56H ?
AL
BL
AND
AL,BL
A B Test A,B
1 1
1 0
0 1
0 0
Question (6) : Find the value of registers TEST AL , BL ,suppose AL= 27H,
BL=56H ?
AL
BL
TEST
AL,BL
22
Department of Computer Science
CSC-210 Computer Organization and Assembly Language
Laboratory Manual
A B A XOR B
1 1
1 0
0 1
0 0
Question (8) : Find the value of registers XOR AL , BL ,suppose AL= 7H,
BL=76H ?
AL
BL
XOR AL,BL
A NOT A
1
0
23