home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / awk / awk320.zip / ASMGEN.AWK < prev    next >
Text File  |  1990-02-08  |  599b  |  38 lines

  1. # delete the opcode and comment fields of the output
  2. # from the ASMGEN disassembler
  3.  
  4. NF < 1 || /^;/   {
  5.     print
  6.     next
  7. }
  8. $1 ~ /^;/ {
  9.     i = 2; 
  10.     printf ("\t%s\t", $1)
  11.     while (i <= NF) {
  12.         printf ("%s ", $i)
  13.         i++
  14.     }
  15.     printf ("\n")
  16.     next
  17. }
  18. {
  19.     if ($0 ~ /^[ \t]/)
  20.         i = 1
  21.     else {
  22.         printf ("%s", $1)
  23.         i = 2
  24.     }
  25.     if (i <= NF) {
  26.         printf ("\t%s\t", $i)
  27.         i++
  28.     }
  29.     while (i <= NF) {
  30.         if ($i ~ /;/)
  31.             break
  32.         printf ("%s ", $i)
  33.         i++
  34.     }
  35.     printf ("\n")
  36. }
  37.  
  38.