下面是一个示例程序,我将其用作索引寻址模式的示例
.section .data
t1:
.int 1,3
.section .text
.globl _start
_start:
mov $0, %di
mov t1(,%di,2), %bx
mov $1,%di
mov t1(,%di,2), %cx
add %cx,%bx
movl $1,%eax
int $0x80
当我组装上面的代码时,我得到以下错误,
$ as indexed-add.s -o indexed-add.o
indexed-add.s: Assembler messages:
indexed-add.s:9: Error: `t1(,%di,2)' is not a valid base/index expression
indexed-add.s:11: Error: `t1(,%di,2)' is not a valid base/index expression
我出错的任何想法