- A parameter list is a series of words in adjacent memory cells. The AP register points to the first of these. The first word holds a COUNT of the number of parameters. The remaining words hold the individual parameters.
- CALLG copies passed address to AP register. It must contain parameter list in the right format.
- CALLS simply pushes the parameter (argument count) to the stack. Since the stack grows toward low addresses, the stack ends up with exactly right sequence of words to represent a parameter list! So the instruction just copies stack pointer to AP, and calls the function. It also sets a special flag to pop values from stack on return.
This is a very neat approach -- with a bit more than a extra push, VAX got a nice instruction to optimize common case of function calls.
Unfortunately, this approach would not work with modern CPUs. In modern PCs, memory accesses are much slower that register accesses, so first few parameters are passed in registers. Calling function with multiple parameters is very different from calling it with one struct.
Nowadays ISAs are compiler targets and nothing more, so human-ergonomic instructions are hilariously quaint.