The RTOS macro portRESTORE_CONTEXT() is the reverse of portSAVE_CONTEXT(). The context of the task being resumed was previously stored
in the tasks stack. The real time kernel retrieves the stack pointer for the task then POP's the context back into the correct
processor registers.
The FreeRTOS pxCurrentTCB variable holds the address from where the tasks stack pointer can be retrieved.
This is loaded into the X register (1 and 2).
The stack pointer for the task being resumed is loaded into the AVR stack pointer, first the low byte (3), then the high
nibble (4).
The processor registers are then popped from the stack in reverse numerical order, down to R1.
The status register stored on the stack between registers R1 and R0, so is restored (6) before R0 (7).