[fpc-devel] About bug 4928, porting dos programs question

Пётр Косаревский ppkk at mail.ru
Thu Mar 30 12:33:59 CEST 2006


Was there an attempt to automatically convert source of dos program for TP with much system-dependance? Of course, there are places that can not be converted without hands (some VGA tricks etc), but it could be possible to highlight such places..

Does anyone know such a tool for legacy transformation?


>   SetConsoleCP(1251);
>   SetConsoleOutputCP(1251);
> It would be good to add a trick like this to win32 crt (i.e. set Windows
> default charset for console) as it would ease porting of old TP programs
> to FPC.
Great!
I have posted that bug, it was found accidentally and was not important for me with new programs.
However, your answer eases porting old programs!
Still, sometimes such tricks don't help: custom dos character tables require more attention when porting. (However, programs with such techniques are usually overhauled with far pointers, direct port accesses and interrupt calls. I didn't succeed in easy porting my favorite self-written computer game.)



More information about the fpc-devel mailing list