Date: Mon, 16 Mar 1998 17:53:18 +0200 (IST) From: Eli Zaretskii To: djgpp AT delorie DOT com Subject: Re: Syntax of "asm" statement In-Reply-To: <#91fpOOU9GA.243@upnetnews02.moswest.msn.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 16 Mar 1998, DeHackEd wrote: > movl $13h, %eax > int $10h > > 3) You can't call real mode interrupts from a protected mode program. Yes, you can, if the specific function of the real-mode interrupt doesn't need pointers to buffers. If the function is only register-based, like in the above case, it will work. > You can > try the following and it will work, though most people prefer to use the DPMI > calls for safety. This code is a little more portable. > > #include > > void set_mode13h() > { > union REGS regs; > regs.x.ax = 0x13; > int86(0x10, ®s, ®s); > } Calling `int86' boils down to issuing the very same `INT' instruction. Look in the library sources and see for yourself.