The following I/O addresses are reserved:
0x00, 0x01, 0x02, 0x0C through 0x14
Doing some tests, I found out that whenever the AVR does an INPUT instruction, the read value is stored somewhere other than the intended register of the INPUT, and stays there. Later you can retrieve the read contents at of the above reserved addresses. Yeah, the INPUT instructions make a copy of the read value in all the above I/O addresses, or, maybe all the above addresses gate the I/O register used to hold the INPUT read.
So, suppose PORTD register contains $F3. If the AVR does an INPUT R5,PORTD, R5 will contain $F3, but also all the reserved addresses above, and will stay like this until another INPUT is executed.
Note that CBI and SBI is a Read-Modify-Write, operation, so doing SBI PORTD,2 will first INPUT x,PORTD, lift bit 2 in "x", and Write the new contents $F7 to PORTD, as OUT PORTD,x.
I don't know where the "bit lift" is done and where is "x", but for sure the Reserved Addresses above will hold the result of the INPUT x,PORTD.
Also, other instructions involving I/O addresses, such as SBIS and SBIC must read the I/O address, and the same results happens. Whenever you do SBIC PORTD,7, the contents of PORTD, in this case $F7, will be hold on the Reserved I/O Addresses above.
LDS instructions changes nothing on such Reserved I/O Addresses.
Of course, this found wasn't planned by Atmel, it might be some unused address selection circuitry to be used on larger chips, that end up gating this INPUT temporary undocumented register. But it is funny to have access to this special register, it may be useful in some circumstances. One that comes up to mind, is when comparing two sequential INPUTs from PINB for example, the first reading would be
INPUT R0, PINB ; it will also store PINB on the reserved I/O addresses
You may lose R0 at this point, later (without any other INPUT done),
INPUT R16,$0 ; retrieve the last and long done INPUT R0, PINB
INPUT R17,PINB ; get a new and actual reading of PINB
CP R16,R17 ; compare old and new
The gain? During the time period of the first and second reading of PINB, that may be a long time, you don't need to store the first reading anywhere, saving one register or SRAM position is not always better than how fast is to store the first INPUT somewhere... goes to the ghost register at $0~$3 or $0C~$14.
Suppose you are creating a Logic Analyzer Capture routine and want to know when PINB changes somehow (no interrupts).
AAA: INPUT R16, $0
INPUT R17, PINB ; this INPUT will be also saved on $0
CP R16, R17
Do something else... take some time (no INPUTs)...
Note that you don't need to save R17 (the last reading of PINB) anywhere, it will stay on $0 until the AAA is called again. Obviously the first pass should be discarded.
Another use (yeah, I know), suppose you have a loop of random CBI / SBI at PORTD, want to halt and check PORTD, the previous value of PORTD, before the last CBI/SBI will be at $0.
Of course, AVRStudio Simulation is a joke in this matter, whenever you make an OUT to any reserved I/O addresses, it keeps the value there, and you can read it back nicely... it treats all I/O addresses as pure memory for write/read ;)