No.
The number of registers that MIPS (or other processor) has does not limit the number of variables that subroutines can have. As many variables as you want can be allocated on the stack. Here is an example program, written in a C-like language.
main() { int a; a = mysub( 6 ); print( a ); } int mysub( int arg ) { int b,c; b = arg*2; c = b + 7; return c; }
To the operating system, main()
is a subroutine.
When main()
first gets control
it must follow the rules under "subroutine prolog".