assemblysystem-callsinterruptdosx86-16

What does "int 21h" mean in Assembly?


I'm new to learning assembly language, and I'm wondering what the command int 21h means. For example:

 mov ah,01h
 int 21h

Which should read a key from the user.


Solution

  • int 21h means, call the interrupt handler 0x21 which is the DOS Function dispatcher. the "mov ah,01h" is setting AH with 0x01, which is the Keyboard Input with Echo handler in the interrupt. See:

    https://mrszeto.net/CIT/interrupts.htm