Yes. PORTD and all of the AVR registers are defined as volatile. That is
why you would want to combine the statements if you want simultaneous
changing of the state of those two pins. If you don't care, then you're
free to have them as two statements, but it would also be inefficient in
terms of code space. Your choice.
Ahh, okay, thank you. I knew it had to be something like that which
I was missing. I assume this was done to keep newbies from asking a
bunch of questions and having to learn what a volatile is. Hmm, I'd
be tempted to have another define that doesn't declare them as volatile
so that the compiler can optimize them more. I guess it would be smarter
to just use a temp variable for that and then assign it to the port
where I would have put a 'memory barrier' otherwise. So, guess it's
pretty prudent to declare them volatile after all. Just took me a
while to come to that realization. :)