I'm new to Assembly level programming and have been given an assignment in MIPS. Having started to plan the assignment, I have come to a rather open ended question that I want your opinion on: given that one has only so many registers to work with on Assembly level, how does one use these efficiently? For example, my assignment requires 4 registers to hold numbers, 4 more registers to hold addresses to arrays, and will probably need more later. And this is just my assignment, I'm sure many assembly programmers have faced a situation in which they have far too many variables to keep track off, and too few registers to work with. So what is best strategy for utilizing registers in MIPS? And in MASM I believe it would be even tricker, given that a lot of the registers have to be used as parameters for Interrupt functions.
Please discuss this,