ORG 0h LOOP: LD SP,M1 ; Setup stack RET ; Run at the stack PROC1: POP HL ; Get parameters POP BC ; for procedure ... RET ; Next procedure PROC5: CP A,20h ; Check if a space RET Z ; Continue on stack if space LD SP,M2 ; Else setup new stack RET ; And run at the new stack M1: DW proc1,v1,v2,proc1,v1,v3,proc5,...,loop M2: DW proc1,v1,v8,...
A sort of high-level code was written in the stack. And the code only contained subroutines and pop's to get the parameters. Beginning was done by return.
The stack calculated by hand was an efficient way to make high-efficient programming and it was more effiecient than using call's, load and push, etc as in typical systems with memory.