Of course programming in machine-code is not wrong, just very hard to do and hard to understand. People don't want to decipher numeric codes to understand what you did. Besides it is very error-prone. The same applies to programming in assembly versus programming in an HLL. You would not write a complete data-base application in assembly, because you would be lost in the details. It is much simpler to understand a one-line 'if' than it is to understand the same 'if' written in assembly that takes two or three pages of code. Isaac Em 21/6/2011 17:06, jim@jpes.com escreveu: > Okay,=20 > > It's sort of like the difference between machine language and > assembler. If someone programs a part in=20 > machine language, and the accepted norm is assembler, that doesn't make > machine language wrong. It just > means that the programmer is coding differently. The program will > still work, assuming they put the=20 > correct command and data in the right places. But it isn't wrong. It > deviates from the accepted practice > of programming in assembler, but it isn't wrong. It's just different. > > Normally I use labels for addresses. In this case I used absolute > addresses because that way I am sure of > what is going on. In the case in question, I originally had the label > "BSR" in the code. When that > didn't work, I changed the label to an absolute address. When that > didn't work either, I posted the > question to the list. I didn't change back to the label because I > didn't figure it was necessary. Maybe I > should have. But as it turns out, the problem was elsewhere, and not > with the address anyway. > > I'll try to leave labels in my code when I post it. But if I forget to > do that, maybe you or someone else > can remind me to replace the addresses with labels if it will make it > easier to give an answer to my=20 > question. =20 > > Anyway, I guess we've beat this dead horse enough. I have my > preferences and you have yours. And that is > probably the way it will be for a while. If the issue of me doing any > coding for you ever comes up, we can > set the programming style at that time so we are always on the same > page. That should eliminate any=20 > problems with what coding style is or isn't acceptable between us. > > It was good talking to you, and I understand you are trying to point > out semantic issues in my coding > style. I appreciate the effort. But I have been programming my way > for so long, it may take several > attempts to get me to change. If you remind me enough and point out > the deficiencies from the accepted > practices enough, one day I might just be programming in the accepted > style. > > =20 > Regards, > > Jim > >> -------- Original Message -------- >> Subject: Re: [FWD: [PIC]: PIC16F1827 PORTB Problem.] *** RESEND *** >> From: Jan-Erik Soderholm >> Date: Tue, June 21, 2011 2:03 pm >> To: "Microcontroller discussion list - Public." >> >> >> OK. >> >> Generally speaking, you are wrong. :-) >> >> Just a very few points... >> >> > ...and in a way that deviates from the generally accepted form. >> >> Which is one, not that uncommon, definition of "wrong". :-) >> >> > Am I trying to get anyone else to use my form? No. >> >> But you asked others to *read* your code. >> That makes a lot of difference. >> >> > But if it works, then it make very little difference. >> >> It makes a lot of difference whan posting here where you >> expect others to aktualy read your code. >> >> But what's the fuzz ? I just pointed out that coding "0x08" >> is way worse then coding "BSR" at the same place. Are you >> actualy arguing *against* that ? If so, no I would probably >> not hire you for work... :-) >> >> Best Regards >> Jan-Erik. >> --=20 >> http://www.piclist.com PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .