Vous êtes sur la page 1sur 25

Laboratory Manual

Computer Organization and Assembly Language

Laboratory Manual

1
Lab # Title page
Lab(1) Computer Anatomy 2

Lab(2) Memory and ports 4

Lab(3) Motherboard and cards 6

Lab(4) Numbering systems 9

Lab(5) Registers types 11

Lab(6) Loading the DEBUG Program 12


Assembly basic Instructions
Lab(7) part (1) 13
Assembly basic Instructions
Lab(8) part (2) 14
Assembly basic Instructions
Lab(9) part (3) 15
Execution Assembly
Lab(10) Instructions(1) 17
Execution Assembly
Lab(11) Instructions(2) 18
Execution Assembly
Lab(12) Instructions(3) 19
Assembly logic operation
Lab(13) Instructions 21

1
Lab (1): Computer Anatomy
Objectives
o
Identify the basic components of computer and their working
o
Explain the importance of various units of a computer

What are the FOUR basic functions of performed by the computer?

Explain the ALU concepts.

Explain about the CU (Control Unit)

What is meant by Output?

2
Question (3):

(a): List four input devices?


1-keyboard
2-mouse
3-scanners
4-printers

(b): List four input devices?


1-digital camera
2-joysticks
3-
4-

Question (4): What are the major components of computer?


1-motherboard
2-processor
3-memory
4-hard disk

Question (5): What is CPU and how does it work? Explain briefly?
This is brain of computers.it performs commands and instruction and controls the operations
of computer.
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------

Question (6): What are the four basic functions performed by the computer?
Input,storage,processing and output
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------

3
Lab (2): Computer Anatomy part (2)
(Memory and ports)

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):usb port

B)serial port

C)ps/2 port

4
Question (2): Differentiate between the following:

(a) RAM and ROM


RAM(RANDOM ACCESS MEMORY)
-RAM is the memory available for operating system
-RAM requires a flow of electricity to retain data.
-RAM is not permanently written.When the computer off,data stored in RAM will be deleted.

ROM(READ ONLY MEMORY)


-ROM is the memory that comes with your computer that is prewritten to hold the instructions
for booting-up the computer.
-ROM is a type of non- volatile memory,data in ROM permanently written and is not erased
when power off the computer
-ROM will retain the data without the flow of electricity.

(b) DRAM and SRAM


DRAM(DYNAMIC RAM)
-DRAM is a type of random access memory that stores each bit of data in a separate capacitor
withinan integrated circuit.

SRAM(STATIC RANDOM ACCESS MEMORY)


-SRAM is a type of semiconductor memory that uses bistable latching circuitry to store each
bit.The term static differentiats it from DRAM which must be periodically refreshed.

Question (3):

a. Distinguish between bit and byte?


Bits
-single numeric values that encode single units of digital information.
Bytes
-sequence of bits,usually eight total bits per one byte

b. Define volatile and non-volatile memory?


Volatile memory is computer storage that only maintains its data while the device is powered.
Non-volatile memory
Non-volatile memory is general term for all forms of solid state(no moving parts)memory that
do not need to have their memory contents periodically refreshed.

Question (4):
(a) There are two kinds of computer memory: primary and secondary. Explain about it.

(b) The memories which do not lose their content on failure of


power
Supplies are known as non-volatile memories. Explain the types
of non-volatile memories
5
Lab (3): Computer Anatomy part (3)
(Motherboard and cards)
Objectives

Identify the components computer and their functions.

Explain the importance types of mother board.

Question (1): write the parts names of motherboard?

6
Question (2): Fill in the blanks?

(a) .................. unit coordinates the activities of all the other units in
The system.

(b) The standard size of display screen is .............. Lines by ...........


Characters.

Question (3): What is Hard Disk?

Question (4): Write Performance parameters of hard disk?

1-

2-

Question (5): Whats a Graphics Card?


-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------

7
Question (6):

a- What is it? - Basic Input Output System


-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------

b- Why is it necessary?
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------

C- List the important Functions of Basic Input Output System?

-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
Question (7): Define the following?

a- Sound Card
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------

b- Network Interface Card

-------------------------------------------------------------------------------------
------------------------------------------------------------------------------------

8
Lab (4): Numbering systems
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):

1. What is the 3-digit 10s complement of 247?


a. Answer:

2. What is the 3-digit 10s complement of 17?


a. Answer:

3. 777 is a 10s complement representation of what decimal value?


a. Answer:

4. What is -20 expressed as an 8-bit binary number in 2s complement notation?


a. Answer:

5. 1100011 is a 7-bit binary number in 2s complement notation. What is the


decimal value?
a. Answer:

9
Question (3):

I-Add 010011112 to 001000112 using signed-magnitude arithmetic.

II-Add 100100112 (19) to 000011012 (+13) using signed-magnitude arithmetic.

Question (4):
I-Subtract 010011112 to 011000112 using signed-magnitude arithmetic II-Subtract

011000112 (99) from 010011112 (79) using signed magnitude arithmetic

III-Subtract 100110002 (24) from 101010112 (43) using signed-magnitude arithmetic.

Question (5):

I-Express 2310 and 910 in 8-bit binary one's complement form.

II-Add 2310 to 910 using one's complement arithmetic.

III-Express 2310, 2310, and 910 in 8-bit binary two's complement forms.

IV-Add 910 to 2310 using two's complement arithmetic

Question (7):
(a) The 2s complement of (01010)2 is

(b) The 2s complement of (0.0010)2 is

(c) The 10s complement of (4887)10 is

(d) The 10s complement of (48.87)10 is

11
Lab (5): Registers types
Objectives


Identify computer registers and there functions

Question (1): List types of data registers?

1-
2-
3-

Question (2): List types of Sections Registers?

1-
2-
3-

Question (3): What are the Differences between AH & AX?

------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------

11
Lab (6): Loading the DEBUG Program

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.

Part 2: Examining and Modifying the Contents of the 80x86's


Internal Registers

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.
_____________ ,_____________ ,______________

2- Here is a short program that demonstrates the use of MOV instruction:

#MAKE_COM# ; instruct compiler to make COM file.


ORG 100h ; directive required for a COM program.
MOV AX, 0B800h ; set AX to hexadecimal value of B800h.
MOV DS, AX ; copy value of AX to DS.
MOV CL, 'A' ; set CL to ASCII code of 'A', it is 41h.
MOV CH, 01011111b ; set CH to binary value.
MOV BX, 15Eh ; set BX to 15Eh.
MOV [BX], CX ; copy contents of CX to memory at B800:015E
RET ; returns to operating system.

12
Lab (7): Assembly basic Instructions
Objectives


Identify Assembly basic
Instructions MOV,XCHG

Question (1) : Write the syntax of MOV,XCHG?

Question (2): Explain the following statements?


1- MOV AX,word
2- MOV AL,'A'

Question (3): Explain the following statements?

1- XCHG AH,BL
2- XCHG AX,WORD

Question (4): Save the Value of A in B

Question (5): Find the error and rewrite the statements?

1-MOV DS,1000
2- MOV DS,ES

13
Lab (8): Assembly basic Instructions

Objectives

Identify Assembly basic Instructions
ADD,SUB

Question (1) : Write the syntax of ADD,SUB?

Question (2) : Write assembly Instructions for the following statements

1- A= 5 A

Question (3): Write assembly Instructions for the following statements

1- A=B-2*A

Question (4): Fill the Blanks in the Following:


Assume
A=15
B=6
MOV AX , A (AX= )
SUB AX , B (AX= )
MOV A , AX (A= )

14
Lab (9): Assembly basic Instructions

Objectives


Identify Assembly basic Instructions.

SUB,DIV,DEC,INC
Question (1) : write the outputs of the following ?

A- MOV DH,41H
ADD DH,3

B- MOV AL , 6
MOV CL , 8
ADD AL , CL

Question (2) :write a program to execute the following statement

CL=2*AL+BL

15
Question (3): write the outputs of the following?

MOV AL , 8
MOV CL , 6
SUB AL , CL

Question (4) :write a program to execute the following statement

120/12H

16
Lab (10): Execution Assembly Instructions
Objectives
Learn how to execute Assembly instructions and observe the results

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] _______________

Question (2): write the outputs of the following?

MOV AX, 5 ;
ADD AX, 3 ;,
INC AX ;
DEC AX ;
SUB AX, 6 ;

17
Lab (11): Execution Assembly Instructions

Question (1)

Procedure
1. Initialize the internal registers of the 80x86 as
follows: (AX) = 0000H (BX) =
0001H

2. Initialize the word storage locations in the memory as


follow: (DS: 0001H) = BBBBH
(DS: 0004H) = CCCCH
3. Enter the following Assembly instructions at the current CS:IP

MOV AX, BX
MOV AX, OAAAA
MOV AX, [BX]
MOV AX, [4]
ADD AX, BX

18
Step1 1Data transfer instructions Using emu8086 to assemble the instructions
(a) MOV AX,BX
(b) MOV AX,0AAAAh
(c) MOV AX,[BX]
(d) MOV AX,[4]
(e) MOV AX,[BX+SI]
(f) MOV AX,[SI+4]
(g) MOV AX,[BX+SI+4]
Step 2 Initializing the internal registers of the 80x86
as follows:
(AX) = 0000H
(BX) = 0001H
(CX) = 0002H
(DX) = 0003H
(SI) = 0010H
(DI) = 0020H
(BP) = 0030H
(DS) = 0B60H
Verify the initialization by displaying the new
content of registers
Step 3 Fill all memory locations in the range DS:00
through DS:1F with 00H and then initialize
the following storage locations:
(DS:0001H) = BBBBH
(DS:0004H) = CCCCH
(DS:0011H) = DDDDH
(DS:0014H) = EEEEH
(DS:0016H) = FFFFH
Step 4 Trace the execution of the instructions (a)
through (g). Explain the execution of each
instruction, including addressing mode,
physical address for memory addressing
mode, value in AX. Fill the table below.

Question (2): fill the following table?

Addressing Physical
Instruction AX Function
Mode Address
a
b
c
d
e
f

19
Lab (12): Execution Assembly Instructions

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?

Question (3): Suppose [2f018h] =0400h DS=2f00h SI=0018h write program to


subtract 03f8h From [SI]?

Question (4): write program to divide two numbers 9/4?

21
Lab (13): Assembly logic Operation


Identify Assembly basic operation Instructions.
OR, AND, Test, XOR, NOT

Question (1) : Fill the following table ?

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

Question (3) : Fill the following table?

A B A.B
1 1
1 0
0 1
0 0

21
Question (4): find the value of registers AND AL , BL ,suppose AL= 27H,
BL=56H ?
AL
BL
AND
AL,BL

Question (5) : Fill the following table?

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
Question (7) : Fill the following table ?

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

Question (9) : Fill the following table ?

A NOT A
1
0

23

Vous aimerez peut-être aussi