You are on page 1of 3

Capital University of Science and Technology

Department of Electrical Engineering

EE3323: Microprocessor and Computer Architecture, Spring 2021


Assignment No. 1
Instructor: Dr. Muhammad Tahir Date: 29/03/2021
Total Marks: 80 Due Date & Time: 12/04/2021 (06:00 pm)

Instructions:

• Late submission is not allowed.


• This is an individual assignment.
• Take pictures of handwritten assignment and compile a PDF file for submission
• Submit the assignment on Google Classroom
• Copied assignments will get zero credit.

Use your knowledge of Number Systems and Digital Logic Design to answer the
following questions.

Use your knowledge of computer architecture to answer the following questions .

Q # 1. Read the topic ‘Evolution of Intel x86 architecture’ from the book (Chapter 2)
and write a note on how the Intel microprocessor architecture has evolved over the
years highlighting all the major changes in Intel architecture. (20-Points)

Q #2. Below is shown contents of a byte addressable memory starting from address
04F8 H. (Both address and data are shown in HEX) (20-Points)

Address Memory Data Address Memory Data

0507 9C 04FF 68
0506 29 04FE 7E
0505 48 04FD 9F
0504 6C 04FC 52
0503 29 04FB 37
0502 8A 04FA 72
0501 7D 04F9 5B
0500 88 04F8 7A

Page 1 of 3
Find value of each of the following data elements in HEX if data is stored in memory
in the same order starting from Address 04F8 H :

8-bit data, 16-bit data, 8-bit data, 32-bit data, 16-bit data, 16-bit data, 32-bit data

(a). If memory is Little endian

(b). If memory is Big endian

(c ). Which of the data elements in part (a) & (b) are stored at aligned addresses and
which data elements are stored at un-aligned addresses ?

Q # 3. (20-Points)

Below are shown contents of ARM Registers and two segments of ARM memory. All
the data is in HEX.

After execution of sequence of assembly instructions shown below, find final


contents of ARM registers and changes in ARM memory and show them in tabular
form. Also show all the intermediate steps.
Table 1. ARM Register Contents in HEX

Register Contents (HEX) Register Contents (HEX)


R0 0000_0000 R8 0000_0000
R1 0000_041A R9 0000_0000
R2 0000_0200 R10 0000_0000
R3 0000_0000 R11 0000_0000
R4 0000_458F R12 0000_0000
R5 0000_220B R13 (SP) 0000_8800
R6 0000_0000 R14 (LR) 0000_0000
R7 0000_0000 R15 (PC) XXXX

Table 2. ARM Memory Contents in HEX

Address Data (HEX) Address Data (HEX)


0425 89 020C 71
0424 5A 020B 67
0423 40 020A 7B
0422 52 0209 78
0421 7E 0208 33
0420 91 0206 9F
041F 10 0205 5C
041E 35 0204 1A
041D 48 0203 90
041C 92 0202 22
041B 56 0201 11
041A 4C 0200 40

Page 2 of 3
Sequence of Assembly Instructions
Push { R4}

Push { R5}

MOV R3, #-4 ; Immediate value in decimal

MOV R5, R3

MOV R4, #80 ; Immediate value in decimal

LDR R8, [R2], #4

STR R8, [R1, #4]!

LDRH R9, [R2], R3

STRH R9, [R1], R3

LDMIA R2!, {R6, R7}

STMIA R1!, {R6, R7}

Pop {R5}

Pop {R4}

Q # 4. (20-Points)
Write a complete assembly program in ARM Assembly language. Assembly program
should do the following:

Define two arrays of 32-bit data and 8 elements each. Initialize both the arrays with
following data. Also define a 3rd array of size 32-bit and 8 elements and initialize it with
zero. Array1 and Array2 will be defined in one data section and Array3 will be defined in
separate data section using AREA directive.

ARRAY1 51, 49 , 31, 28, 91, 66, 80, 101

ARRAY2 33, 65 , 40, 30, 81, 55, 69, 78

Program will add corresponding elements of Array1 and Array 2 and store the resultant
elements in array3 (For addition you can use assembly instruction like ADD R6, R4, R5 ).

Push registers R4, R5, R6 and R7 at the start of the program and pop them at end of the
assembly program. Contents of registers R4, R5, R6 and R7 should remain the same at the
start and end of the program.

Page 3 of 3

You might also like