/*
	KLBFLASH.C

   OP61xx/OP62xx controller for character displays.

   Turns LED's on and off directly.
*/
#use "default.h"
#define LLD1   0x20
#define LD2    0x40
#define KEYW   0x0200
#use "kdm.lib"

main ()
{
   int k, l;

   while (1)
   {
      l = KEYW;                        /* Turn on both LED's */
      lk_wr (l);
      for (k = 0; k < 20000; ++k) hitwd();

      l = KEYW | LLD1;                  /* Turn off LED 1 */
      lk_wr (l);
      for (k = 0; k < 20000; ++k) hitwd();

      l = KEYW | LD2;                  /* Turn on LED 1, turn off LED 2 */
      lk_wr (l);
      for (k = 0; k < 20000; ++k) hitwd();

      l = KEYW | LLD1 | LD2;            /* Turn off LED 1 and LED 2 */
      lk_wr (l);
      for (k = 0; k < 30000; ++k) hitwd();

   }
}