title: Accepting and printing two strings in nasm assembly
body: <p>I have this code:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I'm having problems in printing two strings. It prints excess and garbage characters. Moreover, when I print three strings, it prints excessive characters. What is wrong with my code when it seems right?</p>