You can try utilizing 4FN and 4XE files. These will allow you to compile 4DGL code and save it to Diablo16’s Flash Banks or microSD.

These files can be called/run when needed by your main program.