How to find the deferenced value of a transmit Port Register?
My first question is what is the point of (uint16_t) &amp;PORTD? I am assuming that's just the value of PORTD's register because it is being anded with an empty 16 bit int. 


No.  You're mistaking the operator.  In this context &amp; means the address of, so it is getting the address of the variable called PORTD and casting it to an unsigned 16-bit integer, which it's then storing in the array.


  Now, I followed it all the way here. But how do I find out what actually is the deferenced value? Since this is all IDE, i'm not sure how to GDB this either. 


Again, we're talking addresses.  The port register number is (for port D) 0x0B.  Add that to 0x20 and you get 0x2B which is the address of the register in memory.  Then comes the tricky bit:

#define _MMIO_BYTE(mem_addr) (*(volatile uint8_t *)(mem_addr))


Expand that out with 0x2B and you get:

(*(volatile uint8_t *)(0x2B))


Now, working from the inside out we have:

(volatile uint8_t *)(0x2B)


That says this is a pointer to address 0x2B.

Then that is de-referenced to get the value from that pointer with a * operator:

*(volatile uint8_t *)(0x2B)


So you end up with "The value that is in the address 0x2B"

If we then feed that back into the first part of your question, so:

PORTD = (*(volatile uint8_t *)(0x2B))


then &amp;PORTD would be:

&amp;(*(volatile uint8_t *)(0x2B))


The initial &amp; and * cancel each other out (you can think of them as opposites - one is get the address from a value, the other get a value from an address), so you effectively end up with:

(volatile uint8_t *)0x2B