computer organization and assembly language lab manual, Lecture notes of Computer Science

computer organization and assembly language lab manual

Typology: Lecture notes

2019/2020

Uploaded on 09/02/2020

syedahmad
syedahmad 🇵🇰

4.5

(2)

2 documents

1 / 24

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Department of Computer Science
CSC-210 Computer Organization and Assembly Language Laboratory Manual
1
Computer Organization and Assembly Language CSC-210
Laboratory Manual
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18

Partial preview of the text

Download computer organization and assembly language lab manual and more Lecture notes Computer Science in PDF only on Docsity!

CSC-210 Computer Organization and Assembly Language Laboratory Manual

Computer Organization and Assembly Language

CSC-

Laboratory Manual

CSC-210 Computer Organization and Assembly Language

Laboratory Manual

  • Lab(1) Computer Anatomy Lab # Title page
  • Lab(2) Memory and ports
  • Lab(3) Motherboard and cards
  • Lab(4) Numbering systems
  • Lab(5) Registers types
  • Lab(6) Loading the DEBUG Program
  • Lab(7) Assembly basic Instructions part (1)
  • Lab(8) Assembly basic Instructions part (2)
  • Lab(9) Assembly basic Instructions part (3)
  • Lab(10) Execution Assembly Instructions(1)
  • Lab(11) Execution Assembly Instructions(2)
  • Lab(12) Execution Assembly Instructions(3)
  • Lab(13) Assembly logic operation Instructions

CSC-210 Computer Organization and Assembly Language Laboratory Manual

Question (3):

(a): List four input devices?

(b): List four input devices?

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

Question (5): What is CPU and how does it work? Explain briefly?

Question (6): What are the four basic functions performed by the computer?

CSC-210 Computer Organization and Assembly Language Laboratory Manual

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

B)

C(

CSC-210 Computer Organization and Assembly Language Laboratory Manual

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?

CSC-210 Computer Organization and Assembly Language Laboratory Manual

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?

Question (5): What’s a Graphics Card?

CSC-210 Computer Organization and Assembly Language Laboratory Manual

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 10’s complement of 247? a. Answer: 2. What is the 3-digit 10’s complement of 17? a. Answer: 3. 777 is a 10’s complement representation of what decimal value? a. Answer: 4. What is -20 expressed as an 8-bit binary number in 2’s complement notation? a. Answer:

  1. 1100011 is a 7-bit binary number in 2’s complement notation. What is the decimal value? a. Answer:

CSC-210 Computer Organization and Assembly Language Laboratory Manual

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

CSC-210 Computer Organization and Assembly Language Laboratory Manual

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.

CSC-210 Computer Organization and Assembly Language Laboratory Manual

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,

2- MOV DS,ES

CSC-210 Computer Organization and Assembly Language Laboratory Manual

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,

B- MOV AL , 6

MOV CL , 8

ADD AL , CL

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

CL=2*AL+BL

CSC-210 Computer Organization and Assembly Language Laboratory Manual

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

CSC-210 Computer Organization and Assembly Language Laboratory Manual

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

CSC-210 Computer Organization and Assembly Language Laboratory Manual

Step1 1 Data 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 80x 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: 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?

Instruction Addressing Mode

Physical Address AX Function a b c d e f