This may sound like a really dumb question or I have a bad lot of processors, I doubt that but the question is can I do this:

myvar var byte
portb = myvar

And whatever myvar is, really it is a binary number, the ports pins on portb would change to that state.


Thanks