/*
	printer.c

   Sample program to show printer port usage on the Z104 or ZISA boards.

   Information can be sent to the printer by a call to pprintf(...) issued
   from the watch window.
*/

#use "default.h"

#if (BOARD_TYPE!=Z104ISA)
#fatal "This program only runs on the Z104 or ZISA boards."
#endif

main()
{
int x, y, z;
float a, b, c;

      pprintf("Printed by the Z104/ZISA from Z-World Engineering\n");

      x = 1;
      y = 123;
      z = 1000;

      a = -123.45;
      b = 747.34;
      c = 2192.11;

      // use tab to align the printed data
      pprintf("\ta\tb\tc\tx\ty\tz\n");
      pprintf("\t%8.3f\t%8.3f\t%8.3f\t%5d\t%5d\t%5d\n", a++, b++, c++, 
               x++, y++, z++);
      pprintf("\t%8.3f\t%8.3f\t%8.3f\t%5d\t%5d\t%5d\n", a++, b++, c++, 
               x++, y++, z++);
      pprintf("\t%8.3f\t%8.3f\t%8.3f\t%5d\t%5d\t%5d\n", a++, b++, c++, 
               x++, y++, z++);
      pprintf("\t%8.3f\t%8.3f\t%8.3f\t%5d\t%5d\t%5d\n", a++, b++, c++, 
               x++, y++, z++);
      pprintf("\t%8.3f\t%8.3f\t%8.3f\t%5d\t%5d\t%5d\n", a++, b++, c++, 
               x++, y++, z++);
      pprintf("\t%8.3f\t%8.3f\t%8.3f\t%5d\t%5d\t%5d\n", a++, b++, c++, 
               x++, y++, z++);

      while(1) 
      {
         runwatch();       // try printing from the watch window
         hitwd();
      }
}