{$U-}
module num ;

use
  fpc,math,iostd,system,putnum;

const
  MAXNUM = 256
 
;



var
  cnt<0>,tab<1000>;


sub : [2] var ind*;
  tab + pred(ind) << 1
ret

inline incp ( 0x8B,0xD8,0xFF,0x07,0x8B,0x07 )

sub simple var num*,j<0>,why;
  fldword(@why);
  fsqrt;
  fstword(@why);
  while incp(@j) <= cnt & word(:j) <= why do
    if num % word(:j) == 0 then
      FALSE
      exit
    fi
  wend
  TRUE
ret

sub main var i<2>;
  repeat
    if simple(i) then
      inc(@cnt);
      putword(i);
      cr;
      (:cnt)=i
    fi
  until incp(@i) > MAXNUM loop
ret

end
