GSCats/MerlinToCA65.sh

36 lines
458 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"
$3 = "$" $3
gsub(/,/,",$",$3)
}
}
{
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;
}
}