#!/bin/perl


$asmf = "hurdy2pwmMap.txt";

print($asmf);
print "\n";

open(asmfh,'>',$asmf);

$i=0;

printf asmfh "\t\tDB\t";

while($i<128)
{
	if (int($i/8) == $i/8)
	{
		printf asmfh ";\r\n\t\tDB\t";
	}
	else
	{
		printf asmfh ",";
	}
	if ($i < 100)
	{
		$v=128.0*$i/100.0;
	}
	else
	{
		$v=128.0+(127.0*($i-100.0)/27.0);
	}
	$f=int($v);
	print "$i \t $f \n";
	printf asmfh "0x%02X",$f;
	$i++;
}
printf asmfh ";\r\n";
close(asmfh);