This deserves it's own thread, haven't had a decent war lately.
I was not aware of the different write order. This can kill you in any language. Seriously, you may consider learning a HLL. After 20 happy years using a 6809 assembler, I doubt that AVRs will still be commonly used in another 20 years time. especially the mega162. C is after all just a glorified macro assembler. Or at least you can treat it as such. David.
C is anything but a glorified macro assembler
1: you cant access the SREG in C.
2: un-optimized C is highly inefficient
3: you have no control over what the optimizer produces and are therefore at the mercy of the optimizer.
Yes: C can get the job done, it lets any "idiot" think they are a master coder and that is GOOD for the industry as it means more people can get the job done. C is also extremely difficult to MASTER. Its like the Guitar, almost anyone can play it, almost nobody can play it right, it is one of the most difficult instruments to master.
On the other hand, ASM is simple, elegant, easy to master and gives you fine grained control over EVERYTHING. You dont need to learn horrendously complex and obfuscated / badly documented libraries like ASF to use it.