title: Assembly 8086 string displaying error
body: <p>I have a very easy program in assembly 8086 for university purpose. The main components are working, but when I want to display 2 or more strings I have some special character, impossible to understand output. These are my first tries in assembly so lots of errors are possible, but I cannot figure this out.</p>
  
  <p>The program would be very simple: first display the message "Welcome to my triangle area calculator!" then display "Do you want another try? y-yes n-no" and depending on the key pressed you can retry it or finish the program. Here is my code:</p>
  
  <pre><code>DATA SEGMENT PARA PUBLIC 'DATA'
  
  WELCOME DB "Welcome to my triangle area calculator!$";welcome message
  
  CONTINUE DB "Do you want another try? y-yes n-no$";other message
  
  DATA ENDS
  
  
  CODE SEGMENT PARA PUBLIC 'CODE'
  
  ASSUME CS:CODE, DS:DATA
  
  MAIN PROC FAR
  
  MOV DX,OFFSET WELCOME;load the address of the welcome message in dx
  
  MOV AH,09H; instruction for display
  
  INT 21H; interrupt for display
  
  XOR DX,DX; putting dx back to 0
  
  XOR AX,AX; the same for ax
  
  START:;loop label
  
  MOV DX,OFFSET CONTINUE;loads the address of the other message into dx
  
  MOV AH,09H; display intruction
  
  INT 21H; interrupt for display
  
  MOV AH,01H; character input instruction
  
  INT 21H; interrupt for input
  
  CMP AL,79H; comparison if the inputted character is y
  
  JZ START; jump zero if it is
  
  CMP AL,6EH; comparison if the inputted character is n
  
  JZ FINISHPROGRAM; jump zero to finish the program
  
  FINISHPROGRAM:
  
  MOV AH,4CH; dos program ending
  
  INT 21H
  
  RET
  
  MAIN ENDP
  
  CODE ENDS
  
  END MAIN
  </code></pre>