%begin
%integer index, i, j
%integer %array font(0:4999)
%half %integer %array junk(1:12)
%external %routine %spec gen %alias "FRED_GRAPHICS_GENSYM" %c
      (%integer ch, %half %integer %name st)
%routine read font(%string(255) file); ! Read in (one) font description
  %integer char,num,i,n,min,max,height=0

  %integerfn reverse(%integer x)
    %integer n=0,y=16_8000,c=16
    %cycle
      n = n+y %if x&1#0
      x = x>>1; y = y>>1; c = c-1
    %repeatuntil c=0
    %result=n
  %end

  openoutput(1,file)
  select output(1)
  write(0, 0); space
  write(255, 0); space
  new line
  %for char=0,1,255 %cycle
    write(char, 3)
    print string(" :")
    junk(i) = 0 %for i=1, 1, 12
    gen(char, junk(1))
    num = 1
    num = num+1 %while num<=12 %and junk(num)=0
    write(13-num, 2)
    write(8, 2); space
    %for i = 12, -1, num %cycle
       write(reverse(junk(i)), 0)
       space
    %repeat
    newline
  %repeat
%end
readfont(cliparam.".fnt")
%end %of %program
