BACKTRACE seems to always be 0: 0 from Direct mode (even if there are linebreaks in the input)
COMMON DEF MOE_DIRECT() BACKTRACE VAR S$ FOR L=0TO 7 INC S$,CHR$(CHKCHR(L,CSRY-1)) NEXT RETURN S$=="0: 0" END(demonstration only) If you're okay with dirtying the text console and failing if called from line 0 of slot 0 Simple programs and those that normally hide text layer can use
REPEAT?" "*50LOCATE 0,CSRY-1 UNTIL CHKCHR(1,CSRY)!=58 LOCATE 0,CSRY+1to clean up; TUI-based programs should call the screen redraw routine if available.