I compiled the sources in MingW a few different ways (GCC 64, 32-bit).
And also trying to use "w+b" to force the binary mode.
For input .DO files I also tried using both \r\n and \n line separators.
In all cases the generated .BA files are incorrect and not recognized
ok3c.ba is the correct one from the VirtualT (Saved from BASIC to host).

Which is rejected by VirtualT "Load file".
And when copied with TS-DOS, and loaded in BASIC, it produces wrong tokens and line numbers:

The example .DO is
10 A=1
20 B=A+2
30 PRINTA;B
40 PRINT"Done"