[fpc-pascal] Turbo Pascal 3 graphics

Kevin Lyda kevin at ie.suberic.net
Tue May 7 22:52:39 CEST 2019

Amazingly I still have a number of my high school computer science
projects which were written in Turbo Pascal 3. And a few are almost
not horribly embarrassing.

I'd like to port them to fpc and write up the experience but I know
what the huge issue is: it uses the graphics.bin library which was
brought in with graph.p - a snippet of which is at the bottom of this

It did something like turtle graphics and worked on CGA type systems
which were comically limited. Still, it would be neat to see it run
outside of DOSBox.

So I'm wondering what my options are with FPC graphics. Looking
through the code I used Draw, GotoXY, Palette, Circle and Fillshape -
as well as IO functions like write, read and keypressed.

Any suggestions appreciated, thanks,


  North = 0;
  East  = 90;
  South = 180;
  West  = 270;

procedure Graphics;                                   external 'c:\GRAPH.BIN';
procedure GraphMode;                                  external Graphics[0];
procedure GraphColorMode;                             external Graphics[3];
procedure HiRes;                                      external Graphics[6];
procedure HiResColor(Color: Integer);                 external Graphics[9];
procedure Palette(N: Integer);                        external Graphics[12];
procedure GraphBackground(Color: Integer);            external Graphics[15];
procedure GraphWindow(X1,Y1,X2,Y2: Integer);          external Graphics[18];
procedure Plot(X,Y,Color: Integer);                   external Graphics[21];
procedure Draw(X1,Y1,X2,Y2,Color: Integer);           external Graphics[24];

Kevin Lyda
Galway, Ireland

More information about the fpc-pascal mailing list