%include "inc:util.imp"

%begin {strip diagnostics off end of mob file}

%recordformat f(%half fe02,flags,exp,imp,%integer code,%half reset,main,
                %integer gla,stack,spare1,spare2)
%record(f)%name r
%integer start,end
%string(255)i,o
  %on 9 %start; %stop; %finish
  cliparam -> i.("/").o
  i = i.".mob"
  connectfile(i,0,start,end)
  openoutput(1,o)
  r == record(start)
  r_spare1 = 0; r_spare2 = 0
  end = start+sizeof(r)+r_imp+r_exp+r_code
  start = start+sizeof(r)+r_imp+r_exp+r_reset<<1
  %while start<end %cycle
    printsymbol(byte(start)); start = start+1
  %repeat
%end
