> I am looking for opinions as to what is right or wrong when it comes to > using code found on the internet. I imagine people put it there so > others can use it and learn from it but of course I may be wrong. > > Please... let me know what you think. I can only speak for myself and hope that others think like me... I'll only post a piece of code to the net if I'm willing to have others use it. In general, I make no guarantees with regard to code snippets I post; I'll often be rekeying them from memory (faster than clipping them out of a "real" program that used them and removing or cleaning up any unsuitable comments [e.g. ones that refer to how other sections may inter- act with the one in question]); typos are not uncommon. For major routines like my 16-bit binary->decimal routine I would hope and expect that anyone posting it to the list would credit me for it. If the routine is used within a program that's used or distributed other than via the list, credit may be given or not depending upon circumstances (some companies get paranoid if parts of their software are credited to non-empl- oyees). For lesser code snippets, it's sometimes harder to determine authorship and therefore I may most or include them without crediting anybody. For example, I unfortunately don't know who deserves credit for the "Most Brilliant Four- Instruction Snippet" aware which, IMHO, goes without question to the author of the following code: movf Source,w btfsc C incf Source,w addwf Dest,f which computes (Dest = Source + Dest + Carry), with proper carry out in all cases. I've used that snippet (and variations thereof) many times in may one code and examples, though I make no claim of authorship. Similarly, I have no idea whether anyone else has used either of these two three-instruc- tion gems before I came up with them: btfss Condition1 btfsc Contition2 whatever [executes 'whatever' if either condition1 or condition2 is true], or rlf KZ,w addwf Source,w addwf Dest,f [if KZ is a register that's known to contain zero, this performs an add-with- carry like the above, except that carry out is not correct. Once cycle fast- er though.] With snippets like the above (esp. the KZ one which I've still very seldom seen anyone else use) I wouldn't mind credit [e.g. "using John Payson's KZ trick, we could save a cycle..."] but I recognize that with such a small number of three-cycle instruction sequences in existence it's hard to be too posessive.