Addressing ATmega registers by number

@Grumpy_Mike: How would I rewrite this:

  byte maskAnd = 0x07;
  byte maskEor = 0x73;
  DDRB = ( DDRB & maskAnd ) ^ maskEor;
  0x04 = ( 0x04 & maskAnd ) ^ maskEor;

Line 3 compiles just fine; Line 4 will not compile and would mean something entirely different than to manipulate controller registers.

@Graynomad: I want to be able to send an instruction from my PC to Arduino, saying "what is the current value of DDRB?" If I have to program all registers in an 'if' or 'case' statement, I will probably make many errors and the program will grow really quick in size.

If you check the datasheet of ATmega1280, you'll see DDRB is a register at I/O port 0x04. If you examine the disassembled machine code that is sent to the controller while programming it, you'll see writing to IO ports is simply reading an IO register. I do not mean pin 0x04.