(*  VERSION 0004  *)
{$M plotline}
{$M *}
module plot3;

(*..................................................................*)
(*                           PLOTLIB                                *)
(*  Plotlib is a collection of plot routines to aid in graphics     *)
(*  programs. The routines were originally published in BYTE as     *)
(*  'Drawing with UCSD Pascal and the Hiplot Plotter' by Dr. James   *)
(*  Stork, Oct 1981. The routines have been modified to run with    *)
(*  a MicroAngelo graphics terminal by Ray Hopkins, 8 Chestnut Hill *)
(*  Ct., Cinnaminson N.J. (609) 829-4686.                           *)
(*..................................................................*)

const pi = 3.14159;
      
var
    xpos,ypos :external real;
    
(*$ISTDLIB.DEF *)

external procedure outp(B:byte);

external procedure micro2(comm:byte;x,y:integer);

procedure plotline(penpos:integer;txpos,typos:real);
var   ix,iy : integer;

begin
  xpos:=txpos;
  ypos:=typos;
  ix:=round(xpos*51.1);
  iy:=round(ypos*479/7);
  case penpos of
    0:{initplot}
      begin
        outp($88);
        micro2($84,ix,iy);
      end;
    1:micro2($84,ix,iy);
    2:micro2($91,ix,iy);
  end;
end;


modend.
t