#include<stdio.h>
#include"a826.h"

int Base=0x220;

void main(void)
{ int err;
  unsigned int Dio;

  err=A826_Initialize(0,Base,-1,-1);
  if(err){
     if(err==CheckBoardError){
        printf("Address Error!\n");
     }
     else if(err==CardNumError){
        printf("Card Number Error!(range:0-7)\n");
     }
     return;
  }
  Dio=0x5A5A;
  A826_DO(Dio);
  printf("DO=%4X(Hex)\n",Dio);

  Dio=A826_DI();
  printf("DI=%4X(Hex)\n\n",Dio);
}