title: How does the frame pointer work on the MSP430 and what does the `#llo` macro do?
body: <p>Using the -S flag in gcc I created a assembly file from my C code and in order to better understand how memory is used.  Here is some assembly from the top of the main function:</p>
  
  <pre><code>main:
      mov r1, r4          ; FP = SP
      add #2, r4          ; FP += 2
      add #llo(-14), r1           ; SP -= 14 ?
      mov #llo(-16), r15          ; ???
      add r4, r15         ; r15 += FP
      add #4, r15
  </code></pre>
  
  <p>Comments were placed by me as I tried to dissect what is happening.  My question is the use of the <code>#llo</code> macro, and how the memory on the stack is being used, and lastly what is going into r15?  </p>
  
  <p>For context I have a variables including a structure being placed on the stack at the beginning of main that takes up 14 bytes (7 16bit words).  What I don't understand is what is the <code>#llo</code> macro and what is r15 being used for?  I know r4 is the frame pointer and r1 is the stack pointer.</p>