From: samir AT mindspring DOT com (Samir Barjoud) Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie prolem with ASM! Date: Tue, 10 Mar 1998 03:07:06 GMT Organization: MindSpring Enterprises Lines: 36 Message-ID: <3504abd0.12351691@news.miami.mindspring.com> References: <01bd4bbc$5778a0a0$c1cca8c1 AT rechner-2> NNTP-Posting-Host: user-37kbvmq.dialup.mindspring.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On 10 Mar 1998 00:33:00 GMT, "Lennart Marien" wrote: > > _asm_(" > movsw $0x0003, %ax > int 0x10 > ") Even if the above had compiled ok...it would not have had the desired effect at run-time. Since DJGPP compiled programs run in 32-bit protected mode, you can't directly call a real mode interrupt. In fact, it would have most likely triggered a floating point exception, as that is what vector 16 is used for in protected mode. To call a real-mode interrupt do this: #include void set_text_mode(void) { __dpmi_regs r; r.x.ax = 0x0003; __dpmi_int(0x10,&r); } As for the inline assembly, there is nothing you need to include to use it. The sytax is: asm("assembly-statement"); Samir Barjoud samir AT mindspring DOT com