From: utzoo!watmath!watcgl!dmmartindale Newsgroups: net.unix-wizards,net.sources Title: Re: PDP-11 stack use Article-I.D.: watcgl.126 Posted: Mon Jan 17 22:17:12 1983 Received: Tue Jan 18 00:34:22 1983 References: mitccc.259 Note that the "blank word" in the PDP11 stack layout is always BELOW the local variables, not between them and the saved registers. One word of space is reserved by csv, but if the routine has any local variables one of these will use this word, and the stack address below all of the locals becomes the "blank word". Thus, unless an arithmetic temporary has been stored on the stack, (sp) is always a free word, and so when calling another routine, the last argument can be stuffed directly rather than using auto-decrement addressing. This saves a tiny bit of time, but the real saving comes when adjusting the stack after that routine's return. If you passed only one word of arguments, no adjustment is necessary, if there were two arguments you can use a tst (sp)+ instead of a cmp (sp)+,(sp)+, and for three arguments you can use cmp instead of add. Since an awful lot of subroutine calls will have 1, 2, or 3 arguments this saving is worthwhile.