I am very new to Assembly language. I was reading about MIPS architecture and I am stuck with a concept.
MIPS has four argument registers $a0, $a1, $a2 and $a3. These special
purpose registers are used to hold the parameters passed from the
caller procedure to the callee procedure.
What would happen if the function has more than 4 arguments as there are only four registers to hold the arguments?
Thanks in advance.
They are passed on the stack, quoting from Wikipedia:
More here and here (PDF warning).