#include <math.h>
#include <stdio.h>

#define PI	3.1415927

FILE *fpw0;

void main()
{
	/****** ram set ******/
	double i;
	unsigned char a, j;

	/****** write file open ******/
	if((fpw0=fopen("angl.dat","w")) == 0){
		printf("can't open !!\n");
		exit(1);
	}

	/****** data make ******/
	fprintf(fpw0, "\t\tHEX\t7F");
	for(i=-63.5, j=0; i<63.5 ;i+=127.0/126.0){
		a = (unsigned char)((sqrt((63.5 * 63.5) - (i * i)) * 2.0)+ 0.5);
		if(j--==0){
			j=7;
			fprintf(fpw0,"\n\t\tHEX\t%03X",a);
		}
		else{
			fprintf(fpw0,",%03X",a);
		}
	}
	fprintf(fpw0,"\n;\n");

	/****** write file close ******/
	fclose(fpw0);

}

