aw27 and Jokaste and Hutch,
aw27. Yes, absolutely Kusswarm was after SEH type code and that's why he does what he does. And, as you say, apparently no one on the forum cares about SEH. And, yes you are also right that Kusswarm's NUM_PUSHREG reffers to pushed registers and not parameters. I debated whether to change the name to PUSH_PARMS, but let it stand as is. Why bother with what I did.? This goes to Jokaste's query.
Jokaste and aw27: The goal originally was to understand what PROC actually does...and I gradually drifted off this and towards the code you see before you. As I discovered, if one includes \masm32\include\64\masm64rt.inc then one causes STACKLIB macro to be run and this generates the ENTER\LEAVE pair. If NOSTACKLIB is run, then one gets a "bare bones" PROC and one must create a frame if it's needed. But I drifted past this "discovery" and began to wonder if it was possible to interactively define a suitable stack frame for the 64-bit ABI. After considerable mucking about the above code resulted and mostly thanks to reading Kusswarm's code late in his book. Primarily, this whole business was me learning how the blasted ABI actually works if there are more than 4 parameters.
Hutch: I will post a .zip file. Should have thought about this. Apologies to all.
Mark