I tested this code and the produced .exe is not a valid Windows PE executable. When running the generated file, Windows shows “Unsupported 16-bit application”, which usually means the loader cannot parse the PE headers.
Why is it needed if it does not fulfill its main function?