Date: Tue, 10 Mar 1998 10:45:17 +0200 (IST) From: Eli Zaretskii To: Samir Barjoud , Lennart Marien cc: djgpp AT delorie DOT com Subject: Re: Newbie prolem with ASM! In-Reply-To: <3504abd0.12351691@news.miami.mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 10 Mar 1998, Samir Barjoud 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. Actually, it *is* possible to use the INT NN instruction directly from a DJGPP program. Functions which are register-based (i.e., they don't involve passing data in a buffer) will really work this way. That's because the DPMI server traps the INT instruction and reflects it to real mode (that is, it switches to real mode and reissues the interrupt call). Please in the future try testing the validity of your opinions before posting such definitive replies. With short code snippets such as the one above, it is very easy. The issue of protected-mode programming is complicated enough even without false assertions.