


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this past exam are: Stack, Characters, Buffer Area, First Word Found, Storing, Second Word Found, Output, Input, Continuous Letter Characters, Manipulation Required
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Answer question ONE and THREE other questions. All questions carry equal marks.
Hardware reference guide book is available.
Examiners: Dr. J. Creagh Dr. D. Chambers Mr. E. A. Parslow Mr. P. O’Connor
Q1. (a) Write an 80386 subroutine, which may be called from a C/C++ program to examine a string. The first and second words in the string must be returned. Diagram of stack required. Example: FindFirstTwoWords (Str,Res1,Res2) The first parameter ‘Str’ represents the string of characters to be examined. The second parameter ‘Res1’ represents the buffer area for storing the first word found. The third parameter ‘Res2’ represents the buffer area for storing the second word found. Sample Data Input Str = ‘1960, The 3 fields.’ Output Res1 = ‘The’ Res2 = ‘fields’ Note 1: ASCII ‘0’ = 30H ‘A’ = 41H ‘a’ = 61H Note 2 : A word is considered to consist of one or more continuous letter characters. (16 marks)
(b) Write a detailed report describing stack manipulation required for C/C++ access to 80386 subroutines. Reference to part (a) above is required. (7 marks)
(c) Explain why C/C++ access to 80386 assembly language subroutines may be useful / necessary. (2 marks)
Q2. (a) Write a PowerPC 604 assembly language subroutine to compare two strings. The subroutine may be called from a C/C++ program. The comparison is not case sensitive (i.e. the ‘THE’ is considered equal to the ‘the’). Header Comment Required. Note: ASCII ‘0’ = 0x30 ‘A’ = 0x41 ‘a’ = 0x61 (13 marks)
(b) Write 80x86 subroutines to solve the following:
Q3. (a) (i) Define the following terms:
(ii) Briefly describe the main design principles of a RISC processor. (3 marks)
(iii) With reference to the PowerPC 604e, clearly explain how these RISC design principles apply. Examples required. (8 marks)
(b) With aid of examples, describe and compare each of the mapping functions associated with cache design. (9 marks)
Q6. (a) Define the terms:
(b) (i) What is meant by “interconnection structures” on a computer? Diagram required. (2 marks) (ii) Describe the following interconnection structures:
(c) (i) Briefly describe the PCI bus. Give an example of a typical desktop system. (5 marks) (ii) Recently PCIe was introduced. Why is it required? (2 marks)