title: Sorting in ascending order using 8085.
body: <p>So, here in the following code, I am writing a code to sort numbers in ascending order. </p>
  
  <pre><code>start: nop
  
  MVI B, 09 ; Initialize counter     
  LXI H, 2200H  ;Initialize memory pointer
  MVI C, 09H; Initialize counter 2
  BACK: MOV A, M ;Get the number
  INX H ;Increment memory pointer
  CMP M; Compare number with next number
  JC SKIP;If less, don't interchange
  JZ SKIP; If equal, don't interchang
  MOV D, M
  MOV M, A
  DCX H
  MOV M, D
  INX H ;Interchange two numbers
  DCR C  ; Decrement counter 2
  JNZ BACK ;If not zero, repeat
  DCR B ; Decrement counter 1
  JNZ START
  HLT ; Terminate program execution
  </code></pre>
  
  <p>This was that was taught in class. 
  When I try running the code in GNUSim, I get errors like :</p>
  
  <pre><code>1. Line 9: Undefined symbol.
  2. Line 9: Invalid operand or symbol.Check whether operands start with a 0. Like a0H should be 0a0H.
  </code></pre>
  
  <p>Can somebody help?       </p>