Why would one need to use the PSH/PUL instruction in MAIN?
Isn't the PSH/PUL instruction for 'saving the main's register
contents', thus wouldn't we only need to PSH/PUL when a register is
used in main (not the register used for passing)???
Sometimes push and puls in a main routine is used if you
are not sure that the routines you call will save the
registers in use that you want to use again for a next call.
Also it is possible that the routine you are calling expects the values it uses are on the stack.
In some operating systems you can only return with all
registers holding the same information when your program
was started.
But in all other cases, you don't have to but you can
save the registers.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.