English 中文(简体)
大会 LD & MOV
原标题:Assembly? LD & MOV
  • 时间:2010-07-10 14:10:59
  •  标签:
  • assembly
  • arm

这一指示有什么区别? 例如,在ARM9处理器中,应当:

ASM: mov r0, 0
C: r0 = 0;

ASM: ld r0, 0
C: r0 = 0;

?

我不知道为什么使用一种或另一种方法:

最佳回答

必须:

ASM: mov r0, 0
C:   r0 = 0;

ASM: ld r0, 0
C:   r0 = *(pc + 0);

this Reference卡,如果你重新为ARM开发关于ASM的参考卡,就必须具备这种能力。

问题回答

通常使用LoaD指令将记忆(直接或间接)的数据输入登记册,而MOVe指令的“去除”(复印件)数据则从一个歌剧到一个登记册。 在ARM一案中,源操作是一种价值(固定)或登记册(在复制到目的地登记册之前,两者都可以转移/转播)。

因此,第一种(mov r0, #0?”)将登记编号定为0;第二种(ldr>的假格式?)应当将数据由pc(r15)加抵0,因此相当于

无论是被称作是MOV还是LD,都取决于特定的组装语言。 例如,Z80组装语言在一切方面都使用LD,包括在登记和直接价值转让之间进行登记。

总的来说,你总是在你使用的特定组装语言中研究烟雾的含义。





相关问题
List of suspected Malicious patterns

I am doing an anti-virus project by disassembling its code and analyzing it. So I want a list of the Suspected Malicious pattern codes, so I can observe which is suspected and which is not? So I want ...

Prefetch for Intel Core 2 Duo

Has anyone had experience using prefetch instructions for the Core 2 Duo processor? I ve been using the (standard?) prefetch set (prefetchnta, prefetcht1, etc) with success for a series of P4 ...

How are mutex and lock structures implemented?

I understand the concept of locks, mutex and other synchronization structures, but how are they implemented? Are they provided by the OS, or are these structures dependent on special CPU instructions ...

Installing GNU Assembler in OSX

No matter how hard I google, I can t seem to find a (relatively) easy-to-follow instruction on how to install the GNU Assembler on a mac. I know I can use gcc -c (Apple Clang on a Mac) to assemble .s ...

8086 assembler,INT 16,2

I got stuck at this thing,I want to see if right shift button has been pressed,so I have this assambler code: mov ah,2 int 16h ;calling INT 16,2 - Read Keyboard Flags interrupt mov ah,...

Translate a FOR to assembler

I need to translate what is commented within the method, to assembler. I have a roughly idea, but can t. Anyone can help me please? Is for an Intel x32 architecture: int secuencia ( int n, ...

热门标签