home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / a / armbob / !ArmBob / progs / h / vdu < prev   
Text File  |  1994-06-06  |  722b  |  68 lines

  1. /* Little library of output functions. GCW 02/03/94 */
  2. vdu(s)
  3. {
  4.  local out,i;
  5.  out = fopen("rawvdu:","w");
  6.  for(i=0;i<sizeof(s);putc(s[i++],out));
  7.  fclose(out);
  8. }
  9.  
  10. mode(n)
  11. { vdu(""+22+n); }
  12.  
  13. tab_to(x,y)
  14. { vdu(""+31+x+y); }
  15.  
  16. colour(n)
  17. { vdu(""+17+n); }
  18.  
  19. gcol(k,n)
  20. { vdu(""+18+k+n); }
  21.  
  22. clg()
  23. { vdu(""+16); }
  24.  
  25. cls()
  26. { vdu(""+12); }
  27.  
  28. plot(k,x,y)
  29. { vdu(""+25+k+(x%256)+(x/256)+(y%256)+(y/256)); }
  30.  
  31. move(x,y)
  32. { plot(4,x,y); }
  33.  
  34. line(x1,y1,x2,y2)
  35. {
  36.  move(x1,y1);
  37.  plot(5,x2,y2);
  38. }
  39.  
  40. point(x,y)
  41. { plot(69,x,y); }
  42.  
  43. circle(x,y,r)
  44. {
  45.  move(x,y);
  46.  plot(145,r,0);
  47. }
  48.  
  49. circlefill(x,y,r)
  50. {
  51.  move(x,y);
  52.  plot(153,r,0);
  53. }
  54.  
  55. rectangle(x,y,w,h)
  56. {
  57.  move(x,y);
  58.  plot(97,w,h);
  59. }
  60.  
  61. cursor(n)
  62. {
  63.  vdu(""+23+1+(n%256)+(n/256));
  64. }
  65.  
  66.  
  67. // Now add your own.
  68.