diff --git a/asm.awk b/asm.awk index 74b86c8..a53cf2e 100644 --- a/asm.awk +++ b/asm.awk @@ -97,12 +97,12 @@ BEGIN { # error string to insert into listing function err(str) { errors++ - printf("ERR: %s:\n", str) + if (of=="lst") printf("**** %s:\n", str) } # submit a assembling result to output # set label of current line to off function submit(off) { - if (of=="lst") printf("%04X %-10s %s\n", off, hex, $0) + if (of=="lst") printf("%04X %-18s %s\n", off, hex, $0) if (of=="hex" && hex) printf("%s", hex) if (label) { if (of=="sym") printf("%s\tsym\t%d\n", label, off) @@ -174,8 +174,8 @@ function modrm(str, spare, rs) { } # dont process empty lines or comment lines -/^( |\t)*;/ || /^( |\t)*$/ { - if (of=="lst") printf("%16s%s\n","",$0) +/^( |\t)*(;|%)/ || /^( |\t)*$/ { + if (of=="lst") printf("%24s%s\n","",$0) next } # load symbols from previous pass @@ -273,39 +273,38 @@ op=="db" { for(j=2;j