title: Understanding assembly data segment x86 MASM
body: <p>I have some example code for assembly on <code>x86</code>, using <code>MASM</code> that I am trying to learn from but I'm having a hard time understanding. Here is the following data segment:</p>
  
  <pre><code>    .data
  sNum1   word    23,-17  
  iX      dword   37,54 
  sNum2   word    25,-5,3 dup (-17,4)
  bVal1   byte    'ABC',3 dup(-1,23) ,35
  iNumVals        dword   21,-43,45,167,92,135,-786
  bVal2   byte    '345',37,-1
  iNum1   dword   ?                           ;user-input first number
  iNum2   dword   ?                           ;user-input 2nd number
  iSum    dword   ?                           ;sum of user-input values
  strPromptName   byte    10,13,"What is your name: ",0
  strInput        byte    20 dup(?)           ;holds user-input characters
  strGreeting     byte    10,13,9,"Good morning, ",0
  strPromptNum    byte    10,13,"Enter a number:",0
  strInputNum     byte    12 dup(?)           ;holds input ASCII numbers
  strOutputNum    byte    12 dup(?)           ;numeric characters after conversion
  strSumIs        byte    10,13,10,13,9,"The output sum is ",0
  strArrayIs      byte    10,13,"The values in the array are",0
  </code></pre>
  
  <p>Why are the defined strings that are stored as a <code>byte</code> containing numbers before their string value. For Example - <code>strGreeting</code> contains "Good morning, ", but is preceded by '10,13,9' and succeeded by a ',0'. What is the purpose/methodology for this? Why are these values here? are they some sort of buffer, and if so, what does each represent?</p>