This thing is called an instruction pointer. As soon as the processor decodes the current instruction, it finds how many bytes it takes and knows how much to add to the current value of the instruction pointer in order to go to the next command, so that when the current command is executed, the processor knows what to do next.
So, for example, the processor starts with a pointer to a pointer that stores the value 15, as in your example - it looks like what happens with this address, it happens that the instruction takes 5 bytes, no problem - it adds 5 to the current value, and this gives 20, and so the instruction pointer now stores the value 20, and then the processor executes the current instruction.
source
share