尋址方式

1,直接尋址方式索引

    movl address,%eax內存

    將內存地址address加載到%eaxstring

2,索引尋址方式數據

    movl string_start(,%ecx,1),%eaxtar

    該指令從string_start處開始,將此地址與1*%ecx相加,並將所得值加載到%eax中。

3,間接尋址方式

    movl (%eax),%ebx

    把%eax的值移入到%ebx中

4,基址尋址方式

    movl 4(%eax),%ebx

    該值位於起始地址後4字節處,起始地址在%eax中

5,當即尋址方式

    movl $12,%eax

    把12加載到%eax中

6,寄存器尋址方式

    將數據移入或移出寄存器

相關文章
相關標籤/搜索