Anda di halaman 1dari 18

SANTIAGO CAMPUS

a.
b.

ii.

MIDTERM EXAM

CPE312 (Microprocessor Systems)

General Directions: (Please read before you start the exam)


a.
No permit, No ID, No Exam.
b.
Mobile Phones or any electronic gadgets is not allowed while the exam is ongoing
c.
Anyone caught cheating in any form shall have zero marks in this exam
d.
Conversation in any language is prohibited
e.
Comment or report of the assigned proctor/s about any untoward incident during the exam
that affects the score is considered final and not appealable
f.
Use blue or black pen only
g.
Do not write anything on the test questionnaire
h.
Read and follow the instruction of each type of test very carefully
i.
PERFECT SCORE IS 80 POINTS

I. MULTIPLE CHOICE. Choose the best answer among the choices given. (1 point each)
LD A, 00H
LD B, 01H
LD C, 02H
LD D, 03H
LD HL, 8000H
INC A
ADD A, B
ADD A, C
ADD A, D
LD (HL), A

1. In the assembly language given above, what is the value of A?


A. 05H
B. 06H
C. 07H
D. 08H
2. What is the value of B?

A. 00H
B. 01H
C. 02H
D. 03H
3. What is the value of C?
A. 00H
B. 01H
C. 02H
D. 03H
4. What is the value of D?
A. 00H
B. 01H
C. 02H
D. 03H
5. What is the value of H?
A. 05H
B. 06H
C. 07H
D. 80H
6. What is the value of L?
A. 00H

B. 01H
C. 02H
D. 03H
7. What will be the value of memory address 8000H?
A. 01H
B. 02H
C. 07H
D. 80H

LD A, 01H
CPL A
INC A

8. What is the value of A in the second line of the assembly language?


A. 01H
B. 02H
C. FFH
D. FEH
9. What is the value of A after the execution of the program?
A. 01H
B. 02H

C. FFH
D. FEH
10. What does CPL mean?
A. 1s Complement
B. 2s Complement
C. Negate
D. Compile
LD A, 01H
NEG A
LD B, A
CPL A
INC A
LD C, A
HALT

11. What is the value of A after the execution?


A. 01H
B. FEH
C. FFH
D. 00H
12. What is the value of B after the execution?
A. 01H

B. FEH
C. FFH
D. 00H
13. What is the value of C after the execution?
A. 01H
B. FEH
C. FFH
D. 00H
LD HL, 8000H
LD (HL), 01H
INC L
LD (HL), 02H
RL L
LD (HL), 04H
RL L
LD (HL), 08H
HALT

14. What is the content of memory address 8000H after the execution?
A. 01H
B. 02H
C. 04H

D. UNCHANGED
15. What is the content of memory address 8001H after the execution?
A. 01H
B. 02H
C. 04H
D. UNCHANGED
16. What is the content of memory address 8002H after the execution?
A. 01H
B. 02H
C. 04H
D. UNCHANGED
17. What is the content of memory address 8003H after the execution?
A. 02H
B. 04H
C. 08H
D. UNCHANGED
18. What is the content of memory address 8004H after the execution?
A. 02H
B. 04H
C. 08H
D. UNCHANGED

LD A, 01H
OR 06H
LD B, A
AND F7
LD C, A
XOR D7H
LD D, A
HALT

19. What is the value of A after the execution? ANS: D0


A. 27H
B. 07H
C. 01H
D. 20H
20. What is the value of B after the execution?
A. 27H
B. 07H
C. 02H
D. 20H

21. What is the value of C after the execution?


A. 27H
B. 07H
C. 02H
D. 20H
22. What is the value of D after the execution? ANS: D0
A. 27H
B. 07H
C. 02H
D. 20H
.ORG 8000H
LD B, 05H
LOOP:

LD A, 01H

START:

INC A
CP 05
JP NZ, START
DEC B
JP NZ, LOOP
HALT

23. How many loops are there?


A. 1
B. 2

C. 3
D. 4
24. How many times will the program return to START?
A. Never
B. 10
C. 16
D. 20
25. What is the memory address of START?
A. 8002H
B. 8004H
C. 8005H
D. 8006H
26. How many times will the program return to LOOP?
A. Never
B. 3
C. 4
D. 5
27. What is the memory address of LOOP?
A. 8002H
B. 8004H
C. 8005H

D. 8006H
28. How many instructions are there in the Z80 microprocessor?
A. 100
B. 156
C. 157
D. None of the above
29. It is a computer program that reads a program written in one language, which is called the source language,
and translates it in to another language, which is called the target language.

A. Assembler
B. Compiler
C. Executer
D. Linker
30. An example of a 1 byte instruction is
A. LD A, 01H
B. LD B, 01H
C. LD B,C
D. LD HL, 8000H
31. An example of a 2 byte instruction is
A. LD A, 01H
B. LD BC, 8000H
C. LD B,C
D. LD HL, 8000H

32. An example of a 3 byte instruction is


A. LD A, 01H
B. LD (IX+0), 01H
C. LD IX, 8000H
D. LD HL, 8000H
33. An example of a 4 byte instruction is
A. LD A, 01H
B. LD BC, 0100H
C. LD IX, 8000H
D. LD HL, 8000H
34. An instruction category that involves transfer or load operations
A. Data Copy
B. Arithmetic Operations
C. Logic Operations
D. Bit Manipulation
35. LD A , (2010H)
A. Loads A with 2010H
B. Loads A with the content of 2010H
C. Loads memory address 2010 with A
D. Nothing happens
36. LD HL , 2080H

A. Loads HL with 2080H


B. Loads HL with the content of 2080H
C. Loads memory address 2010 with A
D. Nothing happens
37. IN A, (01H)
A. Loads data from Input port (01H) into A
B. Loads data A to input port (01H)
C. Loads content of (01) to A
D. Loads A with 01H
38. PUSH BC
A. Loads BC with content of Accumulator
B. Loads BC with content of Stack Pointer
C. Loads the BC contents into the stack
D. Loads the BC contents into the A
39. EXX BC, DE
A. Loads BC with DE
B. Loads DE with BC
C. Both A and B
D. Nothing Happens
40. Anything is not only added to the contents of the accumulator.
A. TRUE

B. FALSE
C. MAYBE
D. SOMETIME
41. No two registers such as B and C can be added directly
A. TRUE
B. FALSE
C. MAYBE
D. SOMETIME
42. A register or memory location can be subtracted from the accumulator
A. TRUE
B. FALSE
C. MAYBE
D. SOMETIME
43. CPL B
A. Complements content of B
B. Complements content of A
C. Can not execute
D. Complements A and B
44. NEG
A. 1s Complement
B. 2s Complement

C. 3s Complement
D. Negative A
45. RLC B
A. Rotate value of B
B. Rotate value of B with Carry
C. Rotate value of A
D. Rotate value of A with Carry
46. CP B
A. Copy the contents of a register with the contents of a register or memory location
B. Compare the contents of a register with the contents of a register or
memory location
C. Subtract the contents of a register with the contents of a register or memory
location
D. Compare the contents of a register B with the contents of the accumulator
47. BIT 7, B
A. Check bit 7 in register B
B. Sets bit 7 in register B
C. Clears bit 7 in register B
D. Toggle bit 7 in register B
48. SET 7, B
A. Check bit 7 in register B
B. Sets bit 7 in register B

C. Clears bit 7 in register B


D. Toggle bit 7 in register B
49. RES 7, B
A. Check bit 7 in register B
B. Sets bit 7 in register B
C. Clears bit 7 in register B
D. Toggle bit 7 in register B
50. RST

28H

A. Restart from the location 28H


B. Reset from the location 28H
C. Resist from the location 28H
D. Same as HALT
51. CALL/Return
A. Same as Jump instruction
B. Change the program sequence by calling or returning from a sub routine
C. Returns from a call instruction
D. All of the above
52. Which instruction suspend execution of an instruction
A. RST
B. SET
C. CLR

D. HALT
53. Which is an example of an implied memory addressing
A. LD A, C
B. LD A, (8000H)
C. LD C, (HL)
D. LD C, 01H
54. Which is an example of an immediate memory addressing
A. LD A, C
B. LD A, (8000H)
C. LD C, (HL)
D. LD C, 02H
55. Which is an example of an immediate extended memory addressing
A. LD BC, 9000H
B. LD A, (8000H)
C. LD C, (HL)
D. LD C, 01H
56. Which is an example of an immediate extended memory addressing
A. LD BC, 9000H
B. LD A, (8000H)
C. LD C, (HL)
D. LD C, A

57. Which is an example of an index addressing


A. LD BC, 9000H
B. LD (IX+0), A
C. LD C, (HL)
D. LD C, A
58. Which is an example of an Register indirect memory addressing
A. LD BC, 9000H
B. LD A, (8000H)
C. LD C, (HL)
D. LD C, 01H
59. Which is an example of an Extended addressing
A. RST
B. JP
C. JR
D. HALT
60. Which is an example of an Relative addressing
A. RST
B. JP
C. JR
D. HALT

II.

Show the Fetch, Decode Execute Process of the Microprocessor Unit (20 points)

Prepared by:

Checked by:

Tirso Llantada, ECE


Instructor

Engr. Mary Jane Laranang, MSIT, MCP


College Dean

Anda mungkin juga menyukai