c++ - Problem with inline assembly interrupts

I'm trying to do some basic interrupts in my inline assembly, but when I run the
program it performs an illegal operation. The inline assembly works fine when I
don't use interrupts.
Here's the code I'm using:
#include <stdlib.h>
int main()
{
asm {
mov dl,30h
mov ah,06
int 21h
}
system("PAUSE");
return 0;
}
It should print '0' to the screen. I've also tried some examples from the
Digital Mars FAQs, and the ones without interrupts work fine, but the others
crash.
Thanks for help!

Don't think you really can do that in Win32 code...
How did you target the code? DOS 16 bits?
Nac wrote:

I'm trying to do some basic interrupts in my inline assembly, but when I run
the
program it performs an illegal operation. The inline assembly works fine when I
don't use interrupts.
Here's the code I'm using:
#include <stdlib.h>
int main()
{
asm {
mov dl,30h
mov ah,06
int 21h
}
system("PAUSE");
return 0;
}
It should print '0' to the screen. I've also tried some examples from the
Digital Mars FAQs, and the ones without interrupts work fine, but the others
crash.
Thanks for help!

--
ManiaC++
Jan Knepper
But as for me and my household, we shall use Mozilla...
www.mozilla.org