Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RISC Assembly needed to search array

Status
Not open for further replies.

Rogue10

Technical User
Jun 18, 2003
1
AU
Hi all, I kind of need some help here. I'm relatively new to Assembly, especially RISC.

I need an assembly prgm to find the smallest number in memory between addresses 0 and 32, and store the index in register 5. I know I need a loop in there, I'm just unsure on how to implement it.

Any ideas?
Cheers
 
RISC is just an implementation of the hardware of the processor, it has nothing to do with it's assembly language.

Which assembler are you using? and on which processor?

The general outline of the program would be the following (I'm inventing some pseudo code here:)):
Code:
A = 1
B = [0]
loop:
C = [A]
if C<B then B = C
INC A
if A<=32 then JUMP loop
The desired result is in B


Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
Don't worry what people think about you. They're too busy wondering what you think about them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top