Author Topic: Switching between CRT/graphics modes in FPC  (Read 2567 times)


  • Newbie
  • Posts: 1
Switching between CRT/graphics modes in FPC
« on: March 06, 2014, 12:26:34 pm »
Dear all,

I am a new user of FPC (used to do all my stuff in Borland Pascal 7). In the program below (you may have to run the .exe file) I request an instruction from a CRT screen, activate a graphics page, and then switch back to the CRT screen. However, when I return, the text on the CRT screen is completely wrong. I'm sure I'm doing something wrong here, but haven't got a clue what it could be. Any suggestions? Also regarding the creation of the graphics image, etc?

PS: Forgot to add - I have written numerous bits of BP7 code over the past 20 years or so for engineering designing - it is an impossible task to rewrite all of these in any other language. FPC looks like a godsend - your assistance will be tremendously appreciated!

program TestGraphics;
 uses DOS,Crt,graph;

 var cc:char;

     if FT=1 then
          writeln('Graphics test program');
          write('Press G to create a graphics page or ESC to exit: ');
        end else
          writeln('Continuing test run');
          write('Press g again else ESC to exit: ');
     if upcase(cc)='G' then
         OutTextXY(10,10,'Press any key to continue ...');

   until cc=#27;
« Last Edit: March 06, 2014, 12:38:07 pm by userd157 »