         Edinburgh IMP77 Compiler - Version 8.4

    1  %systemstring(127)%fn itos(%integer v,p)
    2  %string(127)store
    3  %bytename l
    4    %routine printsymbol(%integer x)
    5      l = l+1; charno(store,l) = x
    6    %end
    7    %routine spaces(%integer x)
    8      x = x-1 %and printsymbol(' ') %while x>0
    9    %end
   10    %routine write(%integer n,p)
   11    %integer q,r
   12      %if p>0 %start
   13        p = \p; printsymbol(' ') %and p = p+1 %if n>=0
   14      %finish
   15      p = -120 %if p<-120
   16      q = n//10; *move.l d1,r
   17      %if q=0 %start
   18        p = p+1 %if n<0; spaces(-1-p); printsymbol('-') %if n<0
   19      %else
   20        p = p+1 %if p<0; write(q,p)
   21      %finish
   22      printsymbol(|r|+'0')
   23    %end
   24    store = ""; l == length(store)
   25    write(v,p)
   26    %result = store
   27  %end
   28  
   29  %begin
   30  %end
   31  
   32  %endoffile

   37 Statements compiled
