// experi4b.c

#include <conio.h>
#include <stdio.h>
#include <bios.h>

// include header with constants
#include "const4b.h"

// external prototypes
extern void set_up_ppi(int mode);
extern void get_port(void);
extern int is_closure(int closurenumber);
extern void blinker(long on, long off);

void main(void)
{
  int x,y,r,c;

  get_port(); // get the port number and establish register locations

  // make A an output and B an input
  set_up_ppi(Aout_CUin_Bin_CLin);

  while(1) // stay in loop forever
  { 
    // "keyboard hit" is a function that checks
    // to see if a key has been pressed.
    if(kbhit())
      break;// A key was pressed -- break out of the while(1) loop

    blinker(5000L, 5000L);

  } // end while(1)

} // end experi4b.c


