historyprotected-modeturbo-pascal

Ancient history: Was any version of Turbo Pascal able to compile to Protected Mode on 286 or higher?


I remember 1990's Turbo Pascal 6.0 which had several compiler switches for 80286-specific features, all with a note that they work only in Real Mode but not in Protected Mode. Did Turbo Pascal ever have a compiler that could compile to 286 Protected Mode? (Could this feature be used to write OS/2 native programs?)


Solution

  • Yes. Borland Pascal 7 supported 16-bit PM programs for dos and win 3.x. But it is no longer available (and commercial licenses are very expensive on the 2nd hand market). To make it work with OS/2 you probably need to rework the entire extender model to match OS/2. (e.g. EMX) It might have been done, but the result will probably be clumsy to say the best (and EMX based rather than native)

    However there are two TP/Delphi clones that support nearly the entire TP dialect, and partial Delphi even:

    Both generate 386+ code though, and that might be a problem if you have large amounts of 16-bit assembler you want to port (but these probably need review for the change to 286 protected mode too)

    In general, I would advise Free Pascal, but since the OS/2 port of VP was once very popular, in this case it might be worth to at least have a look at VP too. Specially if the project is limited in scope and time. Long term, Free Pascal, as still active project is a better bet.