Learn/8086 Assembly & Real Mode Architecture/DOS INT 21h Function 09h: Displaying Strings
8086 NASM Assembly 15 min 1 Questions

DOS INT 21h Function 09h: Displaying Strings

DOS INT 21h Services and String Output

Under 16-bit DOS Real Mode (.COM flat binaries):

  • `INT 21h` is the universal DOS API interrupt.
  • `AH = 09h`: Prints a string to standard output. The string address must be placed in `DX` (relative to DS) and must be terminated by a dollar sign ($).
  • `AH = 4Ch`: Exits the process and returns control to DOS with an exit code in AL (AX = 4C00h).
  • nasm
    org 100h
    
    start:
        mov dx, msg
        mov ah, 09h
        int 21h
    
        mov ax, 4c00h
        int 21h
    
    msg:
        db 'OutputTracer DOS$', 0

    Practice & Output Prediction

    Verify your understanding of this lesson. Answers are validated server-side.

    Question 1 of 1 • 10 ptsmultiple choice

    Which character terminates a string printed via DOS INT 21h function AH=09h?