Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please read carefully: To see the usefulness of indexed addressing, consider a simple example involving a list of test scores for students taking a given

Please read carefully:

To see the usefulness of indexed addressing, consider a simple example involving a list of test scores for students taking a given course. Assume that the list of scores, beginning at location LIST. Each record consists of the student's identification (ID) number (4 bytes), followed by the scores the student earned on 3 tests (each test 4 byte). There are n students in the class, and the value n is stored in location LOCN immediately in front of the list. The addresses given for the student IDs and test scores assume that the memory is byte addressable and that the word length is 32 bits.

Write a subroutine that find the address of a certain student by matching his/her student identification number and calculate the average of his/her three tests. Parameters should be passed on the stack; the address of the student id and the average should be also returned on the stack. The content of registers should not be affected by the subroutine.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago