Docsity

Test 1 Questions with Cheat Sheet - Computer Organization | ECE 4270, Exams of Computer Architecture and Organization

Toggle sidebar
bg1
The University of Missouri - Columbia
Electrical & Computer Engineering Department
ECE4270-7210 Microcomputer Architecture and Interfacing
TEST 1
1) Clear your desk top of all handwritten papers and personal notes. You may keep only
your textbook, copy of the lecture notes, the test paper, and a pencil.
2) Read through the test completely and work the problems you can, leaving the difficult
ones untill last.
3) Keep your eyes on your own paper. Cheating will not be tolerated!
4) Work problems on the back of the previous page if necessary.
5) Show your work!
NAME: ______________________________________________________________________
qkd75y-936609-3417419-t1-f08-doc.doc
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Test 1 Questions with Cheat Sheet - Computer Organization | ECE 4270 and more Exams Computer Architecture and Organization in PDF only on Docsity!

Electrical & Computer Engineering Department

ECE4270-7210 Microcomputer Architecture and Interfacing

TEST 1

1) Clear your desk top of all handwritten papers and personal notes. You may keep only

your textbook, copy of the lecture notes, the test paper, and a pencil.

2) Read through the test completely and work the problems you can, leaving the difficult

ones untill last.

3) Keep your eyes on your own paper. Cheating will not be tolerated!

4) Work problems on the back of the previous page if necessary.

5) Show your work!

NAME: ______________________________________________________________________

Electrical & Computer Engineering Department

ECE4270-7210 Microcomputer Architecture and Interfacing

Question 1

The program below has exactly 10 lines with errors. The assembler detected some of these errors

and output the following messages. Find the lines and correct the errors so the program can be

assembled without errors.

Assembling file: FSQ.ASM Error greet.dat(8) Illegal instruction Error 02FSQ.ASM(13) HELLO(4) Illegal use of register Error 02FSQ.ASM(19) Undefined symbol: CODE_SEG Error 02FSQ.ASM(23) Illegal use of segment register Error 02FSQ.ASM(26) Illegal instruction Error 02FSQ.ASM(27) Undefined symbol: OOOOH Error 02FSQ.ASM(32) Undefined symbol: MAKEF Error 02FSQ.ASM(38) Operand types do not match Error 02FSQ.ASM(44) Undefined symbol: OUTPUT Error 02FSQ.ASM(50) Illegal instruction Warning 02FSQ.ASM(51) Unmatched ENDS: CODE_SEG Warning 02FSQ.ASM(52) Open procedure: MAIN Error messages: 10 Warning messages: 2 FSQ.ASM

2 3 stack_seg segment stack use 4 db 100 dup(?) 5 stack_seg ends 6 7 include greet.dat 8 9 data_seg segment 'data' use 10 BUF DB 2000 DUP (?) 11 fileH DB 0 12 outputF DB 'FS02.DAT', 13 hello 14 data_seg ends 15 16 code segment public use 17 18 main proc far 19 assume cs:code_seg,ds:data_seg,ss:stack_seg 20 push ds 21 xor ax,ax 22 push ax 23 mov ds,data_seg 24 printS mess 25 printS newline 26 getS al 27 mov si,ooooH 28 stored: mov [si],si 29 inc si

Electrical & Computer Engineering Department

ECE4270-7210 Microcomputer Architecture and Interfacing

Question 2

Calculate the value of each of the physical addresses below.

a. 1000H:1234H

b. 0100H:ABCDH

c. A200H:12CFH

d. B2C0H:FA12H

Find the unknown value for each of the following addresses.

e. A000H :? = A0123H

f.? : 14DAH = 235DAH

g. D765H :? = DABC0H

h.? : CD21H = 32D21H

Electrical & Computer Engineering Department

ECE4270-7210 Microcomputer Architecture and Interfacing

Find the Hexadecimal numbers corresponding to:

i. (23) 4

j. (12A) 12.

k. Convert (3417.5) 9 to base 3, without converting to base 10 as an intermediate step.

Assume 8-bit long; two’s complement representation for all parts below.

l. Find the Binary and Hexadecimal numbers corresponding to (+27) 10 and (+129) 10.

Are both numbers allowed? Give reasons for your answer.

m. Calculate (A7) 16 – (1B) 16 using only addition of binary numbers.

Electrical & Computer Engineering Department

ECE4270-7210 Microcomputer Architecture and Interfacing

c) RCL BYTE PTR [DI-2][BX],CL (4) GIVE FLAG CF

d) IRET (2)

e) REPNE CMPSB (3) GIVE FINAL FLAG ZF

Electrical & Computer Engineering Department

ECE4270-7210 Microcomputer Architecture and Interfacing

Question 4

A macro REV16 is needed to reverse the bit contents of a 16 bit register or memory location. Let

the single argument for the macro be RorM16. The macro should work with working registers

DX, SI, DI, and BP or any 16 bit memory location.

Example: If DX contained 1001 1100 0011 1110 or 9C3EH

Then, after executing REV16 DX, DX would contain 0111 1100 0011 1001 or 7C39H