SOURCEfactorial.stn17 lines
selectable constructClick source or assembly
Before CAL, the caller reserves a return byte and pushes the evaluated argument. The callee sees n at BP + 4; after return, the argument is discarded and the result remains.
Labels are collected first, then replaced with final 16-bit addresses once the program is placed at the top of 64 KiB RAM.