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

int Base=0x220;

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

  err=A821_Initialize(0,Base,-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;
  A821_DO(Dio);
  printf("DO=%4x(Hex)\n",Dio);

  Dio=A821_DI();
  printf("\nDI=%4X(Hex)\n",Dio);
}
