home *** CD-ROM | disk | FTP | other *** search
- /* > c.ARMGraph */
-
- #include <stdio.h>
- #include "<OSLib$Dir>.h.os"
- #include "<OSLib$Dir>.h.bbc"
-
- /* useful interface routines */
-
- void vdu(int c)
- {
- bbc_vdu(c);
- }
-
- void vduboth(int c)
- {
- bbc_vdu(c); bbc_vdu(c >> 8);
- }
-
- void mode(int m)
- {
- vdu(22); vdu(m);
- }
-
- void plot(int m, int x, int y)
- {
- vdu(25); vdu(m); vduboth(x); vduboth(y);
- }
-
- void move(int x, int y)
- {
- plot(4, x, y);
- }
-
- void moveby(int x, int y)
- {
- plot(0, x, y);
- }
-
- void draw(int x, int y)
- {
- plot(5, x, y);
- }
-
- void drawby(int x, int y)
- {
- plot(1, x, y);
- }
-
- void rectanglefill(int a, int b, int c, int d)
- {
- move(a, b);
- plot(0x61, c, d);
- }
-
- void rectangle(int a, int b, int c, int d)
- {
- move(a, b);
- drawby(c, 0);
- drawby(0, d);
- drawby(-c, 0);
- drawby(0, -d);
- }
-
- void gcol(int a, int b)
- {
- vdu(18); vdu(a); vdu(b);
- }
-
- void colour(int a)
- {
- vdu(17); vdu(a);
- }
-
- void defchar(int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
- {
- vdu(23); vdu(c); vdu(a1); vdu(a2); vdu(a3);
- vdu(a4); vdu(a5); vdu(a6); vdu(a7); vdu(a8);
- }
-
- void erase()
- { vdu(16);
- }
-
- void cont(int a, int b)
- { draw(a,b);
- }
-
- void point(int a,int b)
- { plot(69,a,b);
- }
-
- void circle(int a, int b, int r)
- { move(a,b);
- plot(149,r,0);
- }
-
- void arc(int a,b,c,d,e,f)
- {
- }
-
- void space(int a,b,c,d)
- {
- vdu(24);
- vduboth(a);
- vduboth(b);
- vduboth(c);
- vduboth(d);
- }
-
- void line(int a,b,c,d)
- { move(a,b);
- draw(c,d);
- }
-
- void label(char * l)
- { vdu(5);
- printf("%s",l);
- vdu(4);
- }
-
- void linemod(char *l)
- {
- }
-
- void openpl()
- {
- }
-
- void closepl()
- {
- }
-