title: assembly program to find the smallest among two numbers
body: <p>how do i assembly program to find the smallest among two numbers.</p>
  
  <p>assuming that 
  first number is located a memory address : 0x2001
  second number is located a memory address : 0x2002</p>
  
  <p>store the smaller number in Accumulator </p>
  
  <p>Here is what i attempted :</p>
  
  <pre><code>LDA 0x2001
  MOV B, A
  LDA 0x2002
  CMP B
  JNC smaller
  exit
  smaller :
  MOV A, B
  exit : HLT
  </code></pre>
  
  <p>is my solution correct?</p>