Information Technology Reference
In-Depth Information
that calculates the average score obtained by each student in the five tests and
store the same in memory locations starting at memory location 6000. Each
student is identified by his
her student ID. You may assume that students'
/
IDs are sequential.
7. Repeat Exercise 6 above assuming that the memory used is byte addressable
while each score occupies 32-bit.
8. Rewrite the same program as in Exercise 6 above assuming that the students'
IDs are not sequential, that is, each student ID is to be used as a pointer to
his
her test scores.
9. Repeat Exercise 6 above assuming that the students scores are stored in an
array S(50,5), that is, each row holds the scores obtained by a student
(each score in a column of the same row) and that the first element of the
array, that is, S (0,0) is stored in memory location 4000. The scores are
stored rowwise, that is, one row after the other. The average score obtained
by each student is to be stored at a memory location pointed to by his
/
her ID.
10. Repeat Exercise 9 above assuming that your job is to write a subroutine
to perform the same task as in Exercise 9. Assume that the number of
students, the number of tests, and the location of the first element in the
array are to be passed to the subroutine as parameters in registers R 1 , R 2 ,
and R 3 , respectively.
/
REFERENCES AND FURTHER READING
C. M. Gilmore, Microprocessors: Principles and Applications, 2nd ed., McGraw-Hill,
New York, 1996.
V. C. Hamacher, Z. G. Vranesic, and S. G. Zaky, Computer Organization, 5th ed.,
McGraw-Hill, New York, 2002
A. D. Patterson, J. L. Hennessy, Computer Organization & Design; The Hardware / Software
Interface, Morgan Kaufmann, San Mateo, CA, 1994
B. Wilkinson, Computer Architecture: Design and Performance, 2nd ed., Prentice-Hall,
Hertfordshire, UK, 1996.
Search WWH ::




Custom Search