title: 8086 assembly code bug
body: <p>Hello i try to run that routine but it halted.
  When start AX=4B5B, this code supposed to convert AL content in it's ASCII counterpart and store it in the RESULT variable.
  I've just start assembly so bee kind please, and if someone can help me thx in advance.</p>
  
  <pre><code>ASSUME  CS:Code, DS:Data
  Data    SEGMENT
  RESULT  DB 3 DUP(?)
  Data    ENDS
  
  Code    SEGMENT
  Debut:  MOV BX,   offset RESULT
          MOV AH,   AL
  
  QuartH: MOV CL,   4
          SHR AH,   CL
          AND AH,   0FH
          CMP AH,   0AH
          JAE AlphaH
          ADD AH,   '0'
          JMP FinH
  AlphaH: ADD AH,   'A'
          SUB AH,   0AH
  FinH:   MOV [BX], AH
  
  QuartL: AND AL,   0FH
          CMP AL,   0AH
          JAE AlphaL
          ADD AL,   '0'
          JMP FinL
  AlphaL: ADD AL,   'A'
          SUB AL,   0AH
  FinL:   MOV Byte ptr[BX+1], AL
  
  FinCH:  MOV Byte ptr[BX+2], '$'
  Code    ENDS
          END  Debut
  </code></pre>