\START92\ \COMMENT=saved with Tokens89OCX v.1.00.0005 \NAME=knight \FILE=KNIGHT.89P (n) Prgm Local ver Define ver(x,y,z,n,b)=Func Local u,v,i If z\<=\n^2 Then \(-)\1\->\b[1,1] For i,1,8 x+dx[i]\->\u y+dy[i]\->\v If u\>=\1 and u\<=\n and v\>=\1 and v\<=\n Then If b[u,v]=0 Then z\->\b[u,v] ver(u,v,z+1,n,b)\->\b If b[1,1]=\(-)\1 0\->\b[u,v] EndIf EndIf EndFor Else \(-)\2\->\b[1,1] EndIf Return b EndFunc newMat(n,n)\->\br {1,1,\(-)\1,\(-)\1,2,2,\(-)\2,\(-)\2}\->\dx {2,\(-)\2,2,\(-)\2,1,\(-)\1,1,\(-)\1}\->\dy 1\->\br[1,1] Disp ver(1,1,2,n,br) EndPrgm \STOP92\