0 Members and 1 Guest are viewing this topic.
;start stack check initializer;keeps track of app start location;followed up later in case of emergency exitsStartStackCheckInit pop hl ld (OP6),hl ;load emergency resources into OP6 ld hl,0 adc hl,sp ld (OP6+2),hl ld hl,(OP6) push hl retStartStackCheckInit_end;emergency exit call;used only when an exit is REALLY REALLY REALLY neededExitUsingEmergencyResources ld sp,(OP6+2) ld hl,(OP6) push hl END_APP_RUN ;just a small stand-in for that bcall(_JForceNoCMD...) thing I always forget the name frequentlyExitUsingEmergencyResources_end
Bcall(_JForceNoCmd) already does this for you. It fixes the hardware stack, the floating point stack, and whatever else, so even if you're stack is leaking horribly you should still be able to call it and exit safely to the OS
DJ_O also I just saw this in the new posts list: "Emergency Exiting out of an application by sexually abusing the stack" in the ASM sub forum[23:21:34] DJ_O let me guess: The topic was started by Ashbad <.<[23:21:42] shmibs yup[23:21:48] DJ_O YES i was right