On the HAAS mills the probing system erases MDI.

Is there a way to copy & past to MDI to restore code?

MDI had been used to keep little programs.

For example:

M99 P19;
;
N1;
G90;
G53 X-25. Y0;
M30;
;
N19;
M99 P99;
;
N55;
G55;
M30;
;
N99;

And much more.