I found a nice program which compiles with Turbo Pascal 3 and works fine. Version compiled with Turbo Pascal 7 does not work.
I want to port it to Lazarus. I tried {$mode tp} but it's not enough. I replaced all integers in source code with "integer2" and defined:
But that's not enough. How can I force int16 on all operations, constants etc.? So for eg.
is equal to -138.
There is also this in source code:
writeln('Input file ', in_fn,' is ',infilesize * 128,' bytes.');
For some reason FileSize in TP3 needs to be multiplied by 128 to give correct size.
Attached code and a sample file for the curious people.