



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Answer Question 1 [40 marks] and any three other questions [20 marks each] Maximum available marks is 100
Examiners: Mr. J. J. O’Sullivan Mr. J. Berry Dr. R. Ó Dúbhghaill
Q1 (a) List the main parts of a microcomputer and state the function of each.
(b) In relation to microcomputer programming explain what is meant by an assembler. What is the difference between a resident assembler and a cross assembler?
(c) In a 68000-based system, how many bits in a byte, a word, a longword? What is the largest value in decimal that can be represented by each of these?
(d) Draw a circuit diagram of the simplest possible 8-line parallel input port that you could have in a computer, and briefly explain the action of this circuit.
(e) Explain clearly what the symbols, # and #$ mean in 68000 assembly language programming - give an example to show your understanding of each.
(f) Draw a simple diagram to show how the main memory is normally represented in a 68000-based computer. How many bytes of data can be stored in a block of memory from $400400 to $400450 inclusive?
(g) What will be the address of the next instruction to be executed following the BNE instruction below, assuming D0.L = $A72D51B4 and D1.L = $3E4D51B Explain your conclusion fully. 400400 CMP.W D1,D 400402 BNE $ 400406 CLR.W D
(h) Draw a circuit diagram to show how four LEDs could be connected to a parallel output port. Explain the function of all components in the diagram.
(i) Briefly state what is meant by serial data transmission. Draw a timing diagram to show how the character Z , ($5A in ASCII) would be transmitted in asynchronous serial mode.
(j) List the pins you would expect to find on a 2kByte RAM chip - show all working.
[4 marks each – 40 marks in total]
Q2 (a) Draw a detailed block diagram of the 68000 MPU. [6 marks]
(b) Which part of the MPU is being referred to in each of the following: i) the part of the MPU holding the address of the next instruction ii) the part of the MPU where opcodes are held iii) the input to the MPU which controls the timing of all operations iv) the part that indicates when the signed number range is exceeded v) the part of the MPU holding instruction microprograms vi) the part of the MPU holding the address of the current operand vii) the part of the MPU controlling the lines R/W, AS, LDS, UDS. viii) the part of the MPU where numerical calculations are performed [4 marks]
(c) Explain briefly what is meant by a stack and why a stack is needed in a computer. [4 marks]
(d) Describe fully the sequence of activity that takes place when the JSR instruction below is encountered in a program. Pay particular attention to the role performed by address register, A7, assuming it’s initial contents are $400600. 400400 4EB900400500 JSR $ 400406 ... [6 marks]
Q3 (a) List any advantages of using assembly language for programming a computer over using a high-level language such as BASIC. [5 marks]
(b) As part of a computer program, it is required to check the 16-bit value stored in memory location $400500. If this value is found to be negative, it is necessary to replace it with it’s positive equivalent.
i) Write a short paragraph to outline how you plan to accomplish this task. [4 marks]
ii) Draw a flowchart showing all steps in the program segment. [5 marks]
iii) With the aid of the accompanying 68000 instruction set, write the program in assembly language with appropriate comments throughout. [6 marks]
Q6 Figure 1 below shows a section of memory in a 68000-based computer. Carefully analyse this circuit and answer the following questions. In each case give reasons for your answer, and where appropriate, show any calculations or other relevant working.
(a) Why is one chip marked RAM (^) even and the other RAM (^) odd? [2 marks] (b) What is the total amount of RAM memory in this circuit? [4 marks]
(c) Why is address line A0 missing from the MPU? [2 marks]
(d) What function is performed by the two gates in the centre of the diagram? [2 marks] (e) What is the purpose of the delay circuit on the lower left of the diagram? [2 marks]
(f) The address decoder sets the base address of the RAM - explain this statement [2 marks] (g) Construct an addressing map to set a base address of $8FF000 for this block of RAM and hence draw the circuit diagram of the address decoder [6 marks]
UDS
A 1
A 23
D 0
D 15
A 10 A 0
A 11 A^12
D 7 D 0
RAM even
R/W
AS EN A^23 A^12 Address decoder MEN
AddressBus
DataBus
16-bit MPU (68000)
A 10 A 0
A 11
D 7 D 0
CS (^) RAM odd R/W
D (^8) D 7
DTACK Delaycircuit
R/W CS
LDS
Figure 1
Autumn 2006
Question 4(d)
Name: _______________________ Return with your answer book
X N Z V C
0 1 0 1 0
Registers before Flags before Instruction Registers after Flags after D0: 87654321 D1: 12345678 D0: 18D57B9D D1: E38FA4C D0: 19A42B6A D1: B72D
D0: 7125BA9C
1 0 0 1 0 X N Z V C 1 1 1 0 0 X N Z V C
X N Z V C 1 0 0 1 0
MOVE.L D0,D
ADD.W D0,D
CMP.B D1,D
OR.B #$F0,D
D0: D1:
X N Z V C
D0: D1:
X N Z V C
D0: D1:
X N Z V C
D0: X N^ Z^ V^ C
D0: 41D60783 X N^ Z^ V^ C 0 1 0 1 0
LSL.B #1,D0 D0: X N^ Z^ V^ C