Hi, Scott Dattalo wrote: >On Fri, 3 Nov 2000, w. v. ooijen / f. hanneman wrote: >> what about >> >> incf A, w >> sublw 2 >> ; now carry =3D no borrow =3D ((A =3D=3D 0 ) | (A =3D=3D 1)) >> >> movwf A >> xorwf B, w >> ; now zero =3D ( A =3D=3D B ) >> >> ; standard jump if b1 and b2 >> skpnz >> skpc >> goto larger_difference >> >> Wouter >I guess I'm just going to have start using Jal. Impressive Wouter! However, >there's a slight bug. Here's the corrected version > incf A,w ;If A=3D0 or A=3Dff, then W will become 1 or 0 > addlw -2 ;subtracting 2 will clear the carry if W =3D 1 or 0 >;(Or you could use `sublw 1' and then use skpc below) > > movf A,w ;If the upper two bytes are the same > xorwf B,w ; then the Z bit is set after the xor > > skpnz > skpnc > goto larger_difference > >in_range: Hmmm... THANKS ! :) ... as I said to many goto's from the start ( my main complaint ) but now...neat. Thanks again to all who responded to this little trivial task. /Tony Tony K=FCbek, Flintab AB = =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2 E-mail: tony.kubek@flintab.com =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST