GSCats/MerlinToCA65.sh
2017-10-07 15:00:40 -07:00

34 lines
424 B
Bash
Executable File

#!/usr/bin/env awk -f
BEGIN {
FS="\t";
print "; Autogenerated by Mr. Sprite. Do not modify\n\n"
}
{
if ($2 == "DA")
{
$2 = ".addr"
}
else if ($2 == "HEX")
{
$2 = ".dbyt"
}
}
{
if ($1 != "")
{
first = substr($1,0,1);
if (first == "*")
{
print ";----------","\t",$2,"\t",$3,"\t",$4;
}
else
{
print $1,":\n","\t",$2,"\t",$3,"\t",$4;
}
}
else
{
print "\t",$1,"\t",$2,"\t",$3,"\t",$4;
}
}