Some machines may require multiple M-codes at the beginning and the end. For instance my machine needs the following:
code_begin = M92 M95
code_end = M95 M92 M02 M40
I suggest the parsing should handle the "%nl" special character for these lines as well.
Fixed it on the Master branch
Working, thanks!