我需要做的就是获取用户输入的字符串并将它们放入数组或结构中,但我不断收到错误消息
无效的有效地址
这是什么意思?
编码
section .data
fName db 'Enter your first name: '
fNameLen equ $-fName
lName db 'Enter your last name: '
lNameLen equ $-lName
numberOfStruct equ 50
structSize equ 25
firstName equ 0
lastName equ 10
section .bss
person resb numberOfStruct*structSize
section .text
global _start
_start:
mov esi, 0
input_start:
mov eax, 4
mov ebx, 1
mov ecx, fName
mov edx, fNameLen
int 80h
mov eax, 3
mov ebx, 0
lea ecx, [person+structSize*esi+firstName] ;This is where the error appears
mov edx, 15
int 80h
mov eax, 4
mov ebx, 1
mov ecx, lName
mov edx, lNameLen
int 80h
mov eax, 3
mov ebx, 0
lea ecx, [person+structSize*esi+lastName] ;This is where the error appears
mov edx, 10
int 80h
inc esi
cmp esi,10
jl input_start
exit:
mov eax, 1
mov ebx, 0
int 80h
我做错了吗?