Under what architectures do assembly programs run? I mean,what processors can run the same assembly program?

program written for p4 processor,on a core 2 duo ,core i3 .and core i 3 on a p4,p2 etc......
program written for an Intel processor on a AMD processor.....

and i7 and a core 2 duo. I think their processor registers are totally different from each others because i7 physically has 8/4 cores and core 2 duo only has 2 cores.
answer all the questions if you can.

Recommended Answers

All 4 Replies

Assuming that they don't make use of some newer instructions, any assembly language program written for the architecture now joinly owned by Intel and AMD, can run on any of the processors you mention.

The number of cores a processor has isn't really relevant, except insofar as it make the operating system writer's life more complicated. It is the operating system which gets to decide which core an assembly language (or any other program) gets to run on, and each core is a complete processor in its own right.

If we write the code and it is up to OS to run it on several prceossors(cores) or only one processor , in what cases does OS change the assembly program running core? to let other appliccations to be processed like normally?

Normally an operating system will try to keep a process running on the same core, because the chances are that the said processor will have some of that program's data already stored in its internal caches, whereas that data would have to be read from main memory if an application was switched to another processor.

That is not to say that a program can't be switched to another core if the need arises. Perhaps if there is one core lying idle, and another core ihas a heavy work load.

great.thanks ........

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.