我有这个代码:
section .data
msg3 db 'Enter Two Strings: '
msg3Len equ $ -msg3
section .bss
string1Len resb 1
string1 resb 0
string2Len resb 1
string2 resb 0
section .text
global _start
_start:
mov eax,4
mov ebx,1
mov ecx,msg3
mov edx,msg3Len
int 80h
mov eax,3
mov ebx,1
mov ecx,string1
int 80h
dec al
mov byte [string1Len], al
mov eax,3
mov ebx,1
mov ecx,string2
int 80h
dec al
mov byte [string2Len], al
mov eax,4
mov ebx,1
mov ecx,string1
mov edx,[string1Len]
int 80h
mov eax,4
mov ebx,1
mov ecx,string2
mov edx,[string2Len]
int 80h
mov eax, 0
mov ebx, 1
int 80h
我在打印两个字符串时遇到问题。它打印多余和垃圾字符。此外,当我打印三个字符串时,它会打印出过多的字符。我的代码看起来正确时有什么问题?