You use the following for direct port manipulation
DDRx to set the pins in port x to input or output mode, all pins default to input on reset or power-up.
PORTx set/reset pins on port x.
PINx read the pins on port x.
Where x is the port letters supported by the chip you are writing for. Note that the port letters and how many ports there are, are different between the avr mega8/mega168/mega328 family of chips and the mega1280/2560 family of chips, so be sure to reference the AVR datasheet for the specific AVR chip you are writing for.
http://www.arduino.cc/playground/Learning/PortManipulation
Lefty