'division algorithm
'positive integers
int b,i,j,k,n,m
n=1010
m=026
'n/m
if m=0
  end
endif
'shift m left
while n>m
  j=m
  k++ 'shifts counter
  shl m
wend
for i=1 to k
  shl b
  if n>j
    n-=j 'remainder
    b++
  endif
  shr j 'shift right
next
print b " remainder " n
