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

FILE *fpw0;

main()
{
	/****** ram set ******/
	unsigned short j=0;
	long x;
	double y,a,b,aa,bb;
	double bairitu=0xc0;

	a=20*0x100;
	b=40*0x100;

	bairitu=a/0x20;

	aa=a*a;
	bb=b*b;

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

	/****** slime data make ******/

	for(y=a;y>=256;y=y-256){
		x=2*sqrt((aa-y*y)/16384)*0x140/0x100;
		fprintf(fpw0,"\n\t\tHEX\t000,%03X",x);
	}


	for(y=0;y<=b;y=y+256){
		x=sqrt((bb-y*y)/16384)*0x140/0x100;
		fprintf(fpw0,"\n\t\tHEX\t000,%03X",x);
	}

	fprintf(fpw0,"\n;\n");

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

}
