Mail Archives: djgpp/1998/03/10/03:45:59
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.
- Raw text -