title: How to assemble 16-bit asm code using NASM, then debug it in Linux, before making an executable in DOSBox
body: <p>We've been asked to write 16-bit assembly code and assemble it to run in DOSBox. </p>
  
  <p>I know that 16-bit assembly code just differs from normal x86 assembly code in that it uses <code>bits 16</code> and also 16-bit registers (<code>ax</code>, <code>bx</code> ,<code>cx</code>, ...). </p>
  
  <p>I tried searching on how to use <a href="http://www.nasm.us/doc/nasmdoc8.html" rel="noreferrer">NASM for 16-bit code</a> and unfortunately didn't understand what it's saying.</p>
  
  <p>What I just want to know is what parameters to use in NASM to assemble 16-bit assembly code? (<code>-bin</code> or <code>-obj</code>?), and then if possible, how to debug it in Linux. If not possible, how to debug in DOSBox?</p>
  
  <p>Would really like some help here cause we've been given very minimal resources to understand this so I'm really confused.</p>