Reading or writing all pins of a port in one instruction?

The Arduino IDE emphasizes reading or writing individual pins, but I'd like to read all of the pins on a port at the same time. I know the chip can do this, but I don't know how to do it from C. Also, is there a handy way to set up all the pins on a port as inputs or outputs rather than using Pinmode on each pin? (Again, from C-- I know it can be done in assembler).

I'm using the Atmega43u4 breakout board from Adafruit, using the slightly modified version of Arduino 21 on this page:

I want to read data from ports D and F, and then write it to the USB port. (I know two bits of port F are not available on this chip, but that's OK).

It seems like this would be an obvious question, but I haven't seen it discussed anywhere.

All pins is a bit much but have a look at this ... - -

Thanks, that looks like what I wanted.

ron_bean: Thanks, that looks like what I wanted.

Keep in mind that using direct port manipulation methods will make your code non-portable across different AVR chips used by the arduino platform (say 328p Vs 1280/2560) unless you add conditional coding statements based on processor type used prior to compiling and uploading.