title: INT 21h is not working with AH = 09h
body: <p>I'm trying to program a driver to provide services in 55h. I'm making some tries to be sure everything works but I've found that when I call <code>INT 21h</code> with <code>AH</code> = 09h to print a string, it doesn't print anything, even with the right offset in <code>DX</code>, and I don't have any idea how this can be. In other sections of the code, it works fine.
  Here's my code:</p>
  
  <pre><code>codigo SEGMENT
  ASSUME CS :codigo
  ORG 256
  
  inicio:
      MOV AL, DS:[83H] ;Parameters: when call with '/I' installs driver
      CMP AL, 49H
      JE inst
      CMP AL, 44H ;Parameters: when call with '/D', uninstalls
      JE desinstalar_55h
      JE rsi
  
      PRUEBA DB "THIS IS A TEST",0AH,'$'
  
  rsi PROC FAR
      STI
      CMP AH, 00
      JE firm ;used to check if driver is install
      MOV CX, 0
      CMP AH, 11H
      JE codificar
  volver:
      IRET
  desinst:
      JE desinstalar_55h
  inst: 
      CALL instalador
  firm:
      CALL firma
  rsi ENDP
  
  
  firma PROC NEAR
      MOV AX, 0F0F0H
      RET
  firma ENDP
  
  desinstalar_55h PROC
      PUSH AX
      PUSH BX
      PUSH CX
      PUSH DS
      PUSH ES
      CALL check_driver
      CMP AX, 1
      JE no_instalado
      MOV CX, 0
      MOV DS, CX
      MOV ES, DS:[55H*4+2]
      MOV BX, ES:[2CH]
      MOV AH, 49H
      INT 21H
      MOV ES, BX
      INT 21H
      CLI
      MOV DS:[55H*4], CX
      MOV DS:[55H*4+2], CX
      STI
  no_instalado:
      POP ES
      POP DS
      POP CX
      POP BX
      POP AX
      RET
  desinstalar_55h ENDP
  
  
  instalador PROC
      CALL check_driver
      CMP AX, 1
      JNE ya_instalado
      MOV DX, OFFSET PRUEBA
      MOV AH, 09H
      INT 21H ;here it works fine
      MOV AX, 0
      MOV ES, AX
      MOV AX, OFFSET rsi
      MOV BX, CS
      CLI
      MOV ES:[55h*4], AX
      MOV ES:[55h*4+2], BX
      STI
      MOV DX, OFFSET instalador
  ya_instalado:
      INT 27H
  instalador ENDP
  
  codificar PROC
      CLD
      MOV DX, OFFSET PRUEBA
      MOV AH, 09H
      INT 21H ;here it doens't print anything
      RET
  codificar ENDP
  
  check_driver PROC
      MOV AX, 0
      MOV ES, AX
      MOV AX, OFFSET rsi
      CMP WORD PTR ES:[55H*4], 0
      JNE detectar_mi_driver
      CMP WORD PTR ES:[55H*4 + 2], 0
      JE no_driver
  detectar_mi_driver:
      MOV AH, 0
      INT 55H
      CMP AX, 0F0F0H
      JE fin_check
  no_driver: 
      MOV AX, 1
  fin_check: RET
  ENDP check_driver
  
  codigo ENDS
  END inicio
  </code></pre>
  
  <p>For example, inside 'instalador' rutine, which install the driver, I make a call to <code>INT 21h</code> and it works fine, printing the string. But when I call the interruption 55h with <code>AH</code> = 11h from another .EXE program, it should execute rsi process and jump to 'codificar' rutine, which calls <code>INT 21h</code>, but in this case, it doens't print anything, although it has the same offset in <code>DX</code>. Anyone knows why this can be? Thanks in advance for your help.</p>
  
  <p><strong>EDIT:</strong> I've tried to debugged it with TD and works fine, prints the string. However, when I call the interruption 55h with <code>AH</code> = 11h from another program, it doesn't print anything or just got stuck and never returns.</p>