n IS $0 Parameter A IS $1 B IS $2 a IS $3 Local variables b IS $4 j IS $5 %%% Compare SUB j,n,1 Assume $n>0$. Loop LDBU a,A,j LDBU b,B,j CMPU $0,a,b BNZ $0,Done SUB j,j,1 PBNN j,Loop Done POP 1,0 %%off