Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Sheet1

1- Draw a block diagram representing the main parts of a microcomputer, describe the function of each part. 2- What is the difference between a microprocessor and a microcomputer? 3- What are the main tasks of a microprocessor? 4- What is the importance of the accumulator register in Z80 microprocessor? 5- What is the function of the PC counter? How many bits are there in it? Why this number is related to the number of lines in the address bus? 6- What is the function of the SR register? What is the function of each flag in it?

10101111 XOR 11110001

10101111 AND 11110001

01101110

11011101

00101111 10011001

7- For the pervious operations what are the values of Z80 flags after each operation? 8- Draw a block diagram describing the structure of Z80 microprocessor. 9- How many numbers can be coded using 5 bits? 10- How many bits are there in the address bus of the Z80 microprocessor? How many memory locations could be accessed using this address bus?

Sheet 2
1- What are the results of executing the following Z80 assembly program?
E000 LD A,05

E002 LD B,A E003 LD C,B E004 LD D,C E005 LD E,D E006 LD L,E LD H,L E007 E008 LD (HL),L

2- After reading the previous program what will be the contents of the memory locations: E000, E001,0505 3- What are the results of executing the following Z80 assembly program?
E000 LD HL,E100 E003 LD (HL),3E E005 INC HL E006 LD (HL),05 E008 INC HL E009 LD (HL),47 E00B INC HL E00C LD (HL),48

4- can z80 flags be affected by the transfer instructions? 5- For each arithmetic and logic operation state the flags that can be affected?

6- If A=F3H and B=A4H , write down the contents of the A register and the flags after each instruction from the following program.
ADD A,B SUB A,B SUB A,A INC A AND B OR B XOR B

7- Draw a flow chart for the following program.


E000 LD L,50H LD H,E1H E003 LD (HL),A E005 DEC L E006 JPNZ E005 E007

8- Rewrite the previous program using labels instead of direct addresses. 9- Write a z80 assembly program that counts the number ones in A register. (ex. If A=11101100 then number of ones is 5) 10- Write a z80 assembly program that multiplies 5*6 11- Write z80 assembly program that divides 7/2. 12- Write z80 assembly program that finds the maximum value in the memory range (E100-E1FF). 13- Write z80 assembly program that counts the locations having the value zero in the memory range (E100-E1FF). 14- Write z80 assembly program that counts the locations having odd value in the memory range (E100-E1FF).

15- How many input ports could be connected to Z80 microprocessor? 16- How many output ports could be connected to Z80 microprocessor? 17- Is there is a problem if an input port and an output port both having the same address? 18- Write z80 assembly program that reads input ports (00), counts the number of zeros and output this count to port (00). 19- Write z80 assembly program that reads input port (F0) and converts it to two digits decimal number. Assume the number is less than 100. Then output these two decimal digits (4 bits each) to the output port (00).

Sheet3
1- Draw a complete circuit for buffering Z80 microprocessor buses. 2- What are the functions of the following z80 control lines: RD, WR, MEMRQ, IORQ 3- What are the functions of the following z80 control lines: MEMR, MEMW, IOR, IOW, Draw a circuit showing how to create these lines from the control lines mentioned in Q2. 4- Regarding the control lines (RD, WR, MEMRQ, IORQ) list the active lines during the following Z80 instructions: LD A,05H, IN A,(00H), OUT (00H), A 5- It is required to connect 2kb EEPROM chip to z80 microprocessor what will be the simplest method assuming that there is only one chip? 6- It is required to connect two chips, 2kb EEPROM chip and 2kb RAM chip to z80 microprocessor what will be the simplest method assuming that there is no other chips? 7- You have many 1kb ROM and RAM chips, draw a complete memory systems for z80 microprocessor using blocks. Write the start and end address for each memory block. 8- Draw a complete memory system for z80 microprocessor consisting of 16 block and 4 kb chips. Write the start and end address for each memory block and for each chip. 9- Repeat the previous Question if the word length for the chips was 4 bits only.

You might also like