summaryrefslogtreecommitdiff
path: root/app/mpg/2.2/src/Atari 3-9.GCONF
blob: 82b48267864760a5198e0c9e2f7e8bb2e74a69a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
INCLUDE "std primitives"; 
 
PLOTTER "ATARI",3,9,640,400,21.0,13.0; 
 
COLORS "000999";
 
TEXT VAR atari kommando; 
TEXT VAR atari puffer 2 := "12", 
         atari puffer 4 := "1234";
 
PROC atari g c (TEXT CONST kommando kennung):
  LET esc g = ""27"g";
  atari kommando := esc g;
  atari kommando CAT kommando kennung
   
END PROC atari g c; 
 
PROC atari g w (INT CONST unsigned integer):
  replace (atari puffer 2, 1, unsigned integer);
  atari kommando CAT atari puffer 2
 
END PROC atari g w; 
 
PROC atari g k (INT CONST x, y):
  replace (atari puffer 4, 1, x);
  replace (atari puffer 4, 2, y);
  atari kommando CAT atari puffer 4
 
END PROC atari g k; 
 
PROC atari g e: 
  out (atari kommando)
 
END PROC atari g e; 
 
PROC initplot: 
  INT VAR atari d;
  control (11, channel, 255, atari d);
  atari g c ("B");
  atari g e 
END PROC initplot;
 
PROC endplot: 
  pause;
  INT VAR atari d;
  atari g c ("E");
  atari g e;
  control (11, channel, 25, atari d) 
END PROC endplot; 
 
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 clear: 
  atari g c("C");
  atari g e
END PROC clear; 
 
PROC home: 
  move to(0,0)
END PROC home;

PROC moveto (INT CONST x,y): 
  atari g c("M");
  atari g k(x,y);
  atari g e
END PROC moveto;
 
PROC drawto (INT CONST x,y): 
  atari g c ("D");
  atari g k(x,y);
  atari g e
END PROC drawto;

PROC setpixel (INT CONST x,y): 
  atari g c(".");
  atari g k(x,y);
  atari g e
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): 
  atari g c("K");
  atari g k(x,y);
  atari g w(rad);
  atari g w(from);
  atari g w(to);
  atari g e
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;