Category : Modula II Source Code
Archive   : M2GRAPH.ZIP
Filename : BASICGRA.DEF

 
Output of file : BASICGRA.DEF contained in archive : M2GRAPH.ZIP
DEFINITION MODULE BasicGraphics;
(* Simple graphics routines for CGA card
Dave Sewry, modified Pat Terry, December 1988 *)

PROCEDURE GraphMode;
(* Select 640 x 200 graphics mode *)

PROCEDURE TextMode;
(* Select 80 x 25 Text mode *)

(* +++++++ The following routines work in basic 640 x 200 mode ++++++++ *)

PROCEDURE PixelOn (X, Y : CARDINAL) : BOOLEAN;
(* TRUE if pixel at X, Y is currently on *)

PROCEDURE PlotPoint (X, Y : CARDINAL);
(* Turn on pixel at X, Y *)

PROCEDURE ErasePoint (X, Y : CARDINAL);
(* Turn off pixel at X, Y *)

PROCEDURE XorPoint (X, Y : CARDINAL);
(* Exclusive OR pixel at X, Y *)

PROCEDURE PlotLine (X1, Y1, X2, Y2 : INTEGER);
(* Draw a line from X1, Y1 to X2, Y2 *)

PROCEDURE EraseLine (X1, Y1, X2, Y2 : INTEGER);
(* Erase a line from X1, Y1 to X2, Y2 *)

PROCEDURE XorLine (X1, Y1, X2, Y2 : INTEGER);
(* Exclusive OR a line from X1, Y1 to X2, Y2 *)

PROCEDURE PlotChar (X, Y : CARDINAL; Letter : CHAR);
(* Write Letter at pixel position X, Y *)

PROCEDURE PlotString (X, Y : CARDINAL; Message : ARRAY OF CHAR);
(* Write a Message string starting at pixel position X, Y *)

(* +++++++ The following routines work in a world window of real limits
mapped onto the basic 640 x 200 mode +++++++++++++++++++++++ *)

PROCEDURE SetWindow (MinX, MinY, MaxX, MaxY : REAL);
(* Set graphic world window to span the area (MinX, MinY) .. (MaxX, MaxY *)

PROCEDURE PlotRealPoint (X, Y : REAL);
(* Turn on pixel at X, Y *)

PROCEDURE EraseRealPoint (X, Y : REAL);
(* Turn off pixel at X, Y *)

PROCEDURE PlotRealLine (X1, Y1, X2, Y2 : REAL);
(* Draw a line from X1, Y1 to X2, Y2 *)

PROCEDURE EraseRealLine (X1, Y1, X2, Y2 : REAL);
(* Erase a line from X1, Y1 to X2, Y2 *)

PROCEDURE PlotRealChar (X, Y : REAL; Letter : CHAR);
(* Write Letter at pixel position X, Y *)

PROCEDURE PlotRealString (X, Y : REAL; Message : ARRAY OF CHAR);
(* Write a Message string starting at position X, Y *)

PROCEDURE DrawXAxis;
(* Draw X axis, if it fits *)

PROCEDURE DrawYAxis;
(* Draw Y Axis, if it fits *)

END BasicGraphics.


  3 Responses to “Category : Modula II Source Code
Archive   : M2GRAPH.ZIP
Filename : BASICGRA.DEF

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/