Lab 12 - FL13 - ECE 198 JL - University of Illinois - Engineering Wiki

Note that we us e generic ac tion terms here lik e

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: on terms here lik e “Load” and “Compare” – thes e are an important part of the algorithm, but it is up to y ou to figure out how to ac c omplis h thes e ac tions . Basic Algorithm 1. Initializ e Regis ters a. Initializ e two regis ters to z eros , s ay , R1 and R2, to be us ed as intermediate regis ters for whic h y ou c an us e for c alc ulations b. Initializ e a regis ter, s ay R3, to be us ed as a pointer to point to the loc ation of the numbers in memory that are being analy z ed, s tarting from addres s x 3132 c . Initializ e a regis ter, s ay R4, to the value 10. This will be us ed as a c ounter d. Initializ e Regis ter 5 to the value s tored in memory at addres s x 3132 2. Set up y our loop a. Load in from memory (us ing R3 to tell y ou where) one of the ten binary numbers b. Compare the c urrent max number s tored in R5 to the number jus t loaded i. If the new number is bigger than what is in R5 c urrently , replac e the value in R5 with the bigger number ii. if the new number...
View Full Document

This document was uploaded on 03/22/2014.

Ask a homework question - tutors are online