$PROG function
The $PROG function is used to return the name of the last program LOADed. The $PROG function is valid wherever an alpha function is valid. The $PROG statement is set to blank after a CLEAR is executed.
The value of $PROG is also displayed as part of the LIST RETURN output.
The $PROG function is most useful when used in conjunction with the RESAVE command.
Syntax examples:
RESAVE $PROG 1000
program$(count) = $PROG & comp_no$
mod$ = STR($PROG,1,2)