The key to making this scheme possible is:
1. Compilers still generate code as if the program (segments) are to
be loaded into contiguous blocks of storage.
2. This means the PC will still work as before - after fetching an
instruction, the PC is incremented.
3. The executable program is also thought of being split into pages
of the same size as used for physical memory (e.g., 1K byte
pages). These are called virtual pages as opposed to the
physical pages of memory.
4. A virtual page is loaded into any free physical page. (A
data structure, the page table must record for each virtual
page number, the physical page number where it was stored.)
5. The virtual address in the PC is not simply copied into the MAR,
however. It is translated by the hardware memory management unit
(MMU) in the cpu to the corresponding physical address where the
code instructin is actually located. The MMU must have the page
table information in order to do this.