app/mpg/2.2/src/AMPEX 2-1-6.GCONF

Raw file
Back to index

INCLUDE "terminal plot"; 
INCLUDE "std primitives"; 
 
PLOTTER "AMPEX",2,1,78,47,21.5,16.0; 
 
LINK 2/2,2/3,2/4,2/5,2/6; 
 
COLORS "000999";

PROC clear: 
  IF plot
  THEN INT VAR i;
       FOR i FROM 1 UPTO 24
       REP display [i] := empty line PER;
       page
  ELSE errorstop ("PROC clear : clear without plotmodus") FI
END PROC clear; 
 
PROC prepare:
    break(quiet);
    REP 
       disable stop;
       continue (channel(plotter)); 
       clear error;
       enable stop; 
       IF NOT online 
          THEN pause (300)
       FI
    UNTIL online PER
END PROC prepare;

PROC initplot: 
  plot := TRUE;
  cursor (x pos + 1,  24 - (y pos) DIV 2)
END PROC initplot;
 
PROC endplot: 
  pause;
  plot := FALSE
END PROC endplot; 
 
PROC home: 
   move to (0,0)
END PROC home;
 
PROC moveto (INT CONST x,y): 
  x pos := x ;
  y pos := y
END PROC moveto;
 
PROC drawto (INT CONST x,y): 
  new x pos := x;
  new y pos := y;
  plot vector (new x pos - x pos, new y pos - y pos) ;
END PROC drawto;

PROC setpixel (INT CONST x,y): 
   move to (x,y);
   point
END PROC setpixel;

PROC foreground (INT VAR type): 
   type := 1
END PROC foreground;

PROC background (INT VAR type):
   type := 0
END PROC background; 
        
PROC setpalette:
END PROC setpalette;
 
PROC circle (INT CONST x,y,rad,from,to): 
   std circle (x,y,rad,from,to)
END PROC circle; 
 
PROC box (INT CONST x1,y1,x2,y2,pattern): 
   std box (x1,y1,x2,y2,pattern)
END PROC box; 
 
PROC fill (INT CONST x,y,pattern): 
END PROC fill;