CPU Regsiters

Status
Not open for further replies.

DaRetard

Beta member
Messages
5
I recently started looking into ASM and reading different books about it,etc. One question that's been bugging me is the registers. It appears to me that every single program in memory uses some register in some way. So how can it be that all programs can use all the registers simultaneously without messing up the other programs? Does the CPU create a copy of the registers for each program? BTW this is regarding the newer Intel x86 processors. Thanks for any help!:D
 
i'm pretty sure that processors have to have the ability to share registers simultaniously in order to operate....
 
for the programs that I have read, everytime a function returns a value to eax (or other), the program saves it in RAM immediately. multitasking is like, when a window is waiting for message from user or another window, Windows can give control of CPU to another program. Surely a CPU cannot process more than one program at one time, in other words it does everything one by one and sometimes leave one alone and come back later. whenever a program is "hung up", it's paused and the registers clear.
 
Status
Not open for further replies.
Back
Top Bottom