不知道为什么我不能在地址计算中使用 eax ......以下返回无效的操作数类型错误......
我有一个带有一个参数的宏:
%macro IdPrompt 1 ; 1% - the offset within Buff at which to write the ID that is read in
mov eax, 3 ; Specify sys_read call
mov ebx, 0 ; Specify File Descriptor 0: Stdin
mov ecx, Buff+([%1]*2) ; Pass offset of the buffer to read ID into, 2 is the scale
mov edx, 3 ; Pass number of bytes to read at one pass
int 80h ; call sys_read to fill the buffer
%endmacro
宏在另一个宏中被 this 调用:
IdPrompt eax ; call IdPrompt to get one ID
我尝试使用较小的寄存器,以及缓冲区地址为: Buff+%1*2 没有运气