English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

One of the operands has to be a register. This seems to be a huge incovenience to programmers.

The only reason I can imagine is that the processor designers wanted to discourage programmers from accessing memory often.

2007-04-12 17:13:32 · 5 answers · asked by Hishimoro K 1 in Computers & Internet Programming & Design

5 answers

Speed; I don't mean a 286 will outperform a 8086 but register is faster since all CPUs work as arithmetic accumulators it would be difficult to and extremely slow to acc. to a memory so assembly instructions usually need a register as operands.

2007-04-12 18:43:15 · answer #1 · answered by Andy T 7 · 0 0

This is machine language we're talking about which means each statement you write will map to an instruction. How do you expect to perform an ADD on two memory locations

2007-04-13 23:35:02 · answer #2 · answered by Anonymous · 0 0

This is machine language we're talking about which means each statement you write will map to an instruction. How do you expect to perform an ADD on two memory locations?

2007-04-13 22:39:49 · answer #3 · answered by Smutty 6 · 1 0

I took this course not long ago, and I believe that the reason is that registers such as the AX register have been designed to handle the arithmetic operations. Memory is just memory, it just stores data but it doesn't perform any operations that I know of.

2007-04-12 17:27:12 · answer #4 · answered by Anonymous · 1 0

In x86 it's mov eax,alpha mov ebx,beta add eax,ebx result is stored in eax

2016-05-19 15:05:08 · answer #5 · answered by ? 3 · 0 0

fedest.com, questions and answers