At university this past semester, we played around with x86 assembly- learning how to move memory into registers, playing with the instruction sets, and doing a bit of reverse engineering with binary bombs.
But this got me thinking, if I can write a program which can move memory into the EAX register, what if another program wants to use the EAX register, too? Computers execute droves of instructions under multiple processes nowadays- how is the value that I write in a particular register saved when another process wants to use that register as well? Is it moved to RAM? Into caches?