%begin
%externalroutinespec phex %alias "s_phex" (%integer x)
%integer i,j,k,corr,fail
%integerfn div(%integer x,y)
%result=x//y
%end
fail=0
%for k=20,-1,-20%cycle
      %if k//2#div(k,2) %then fail=1
      %if k//4#div(k,4) %then fail=1
      %if k//8#div(k,8) %then fail=1
      %if k//16#div(k,16) %then fail=1
      %if k//1#div(k,1) %then fail=1
%repeat
%if fail=0 %then printstring("TEST OK") %else printstring("Divide in error")
newline
%endofprogram
