I did not test it, but perhaps this works: const uint DOS_IRQ_VECTOR = 0x21; void callIrq( ushort interrupt_code ){ asm{ mov AH, interrupt_code ; int DOS_IRQ_VECTOR ; } }