program fixnasm; {$ifndef FPC} procedure readln(var t:text;var s:string); var c : char; i : longint; begin c:=#0; i:=0; while (not eof(t)) and (c<>#10) do begin read(t,c); if c<>#10 then begin inc(i); s[i]:=c; end; end; if (i>0) and (s[i]=#13) then dec(i); s[0]:=chr(i); end; {$endif} const spaces=' '; var t,f : text; para,bytes,flags, opcode,lastop, s : string; i,j : longint; begin writeln('Fixing insns.dat -> insns.new'); assign(t,'insns.dat'); reset(t); assign(f,'insns.new'); rewrite(f); lastop:=''; while not eof(t) do begin readln(t,s); if (s<>'') and (s[1]<>';') then begin i:=pos(' ',s); j:=pos(',',s); if (j>0) and (jlastop then begin writeln(f,''); writeln(f,'[',Copy(s,1,i-1),']'); lastop:=opcode; end; while (i