Hello,
Show quoted text 14 lines
I would be very happy to solve the following problem, any suggestion is welcome.
I work with MS-DOS 6.2, trying to port from TP55 to Freepascal GO32.
There is a terminate stay resident program (for which I have no access to the
sources) that deals with the interface part of the application (GUI).
It is started and installed at boot time (remember the old autoexec.bat).
It is the acceessed by just writing to the screen sequences with a special begin
sequence and end sequence. To put it more simply, in order to open a window the
Pascal program must issue a writeln('#19#254#1,'open window mywindow.aid',#1);
I want to avoid writing over again all the screen managing routines.
Of course I know that the TSR concept is 16 bits and that freepascal works in 32
bit.
Any ideas ?
From your description the TSR program seems to intercept DOS-interrupt 21h and interpretes the given data if it goes to the standard output (just a guess - maybe wrong :)
You can verify this if you set 'directvideo := true;' in the TP5.5 program (if it uses CRT) and interacting with the TSR should not work anymore ;-)
[Not sure if there's already this flag in TP 5.5 CRT unit]
So *if* this is the case, the TSR should already work with FPC programs that don't use the CRT unit. This is because the CRT unit basically always does direct writing to the video memory, bypassing the DOS interface similar to when 'directvideo := true' in TP.
You can try by making a simple example program which does not use CRT trying to send some data to the TSR.
If this works, you only have to redo the parts of the CRT unit which assume direct memory access and are required by your program. I think this is easier than doing the windowing stuff.
But, then again, I'm just guessing....
Regards,
Thomas