No.
The number of registers of MIPS (or other processor) 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.
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".