GSCats/MerlinToCA65.sh

36 lines
458 B
Bash
Raw Normal View History

#!/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"
2017-10-17 15:21:29 +00:00
$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;
}
}