Thread overview | |||||
---|---|---|---|---|---|
|
April 14, 2006 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! |
April 14, 2006 Re: Problem with inline assembly interrupts | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nac | 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 |
April 14, 2006 Re: Problem with inline assembly interrupts | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan Knepper | Yes, I was compiling for Win32...I fiddled with command line args to change it to DOS16 mode and now it works fine. Thanks! In article <e1o9lj$2fvc$1@digitaldaemon.com>, Jan Knepper says... > >Don't think you really can do that in Win32 code... >How did you target the code? DOS 16 bits? > > > > >-- >ManiaC++ >Jan Knepper > >But as for me and my household, we shall use Mozilla... www.mozilla.org |
Copyright © 1999-2021 by the D Language Foundation