-
Notifications
You must be signed in to change notification settings - Fork 0
Set Stack 0
marc365 edited this page Mar 25, 2026
·
1 revision
FxBox uses a trick with the Stack, only Procedures use the Stack, there is only 1 Procedure in FxBox to catch fatal errors so it doesn't "Return" on the stack it will "Resume" from the error. If you try to add a Procedure to FxBox it will crash. The quantum audio system runs On Every 1 Gosub PLYING - this is only possible without a Stack. Procedures unfold on the stack on the next vertical blank, and assume that the CPU registers are still intact, but the FxBox code ran before the Procedure unfolded, changing the state and destroying it for the Procedure. Procedures are slower than Gosub's in AMOS, this is why. Older versions of FxBox used procedures, but the new versions only use Subroutines and branch much more quickly.