Mail Archives: djgpp/2000/06/22/05:00:46
On Wed, 21 Jun 2000, Lanugo of the wandering souls wrote:
> This is my problem: I need to call an INT instruction (I do not know nearly
> anything about assembly, I'm just copying some code found on a website,
> written for another compiler), but when I write
>
> asm ("mov %ax, $0x13" : "int $0x10");
>
> the compiler does not work properly due to a parse error befor ).
You don't need assembly for this. Here's how to say this in C:
#include <dpmi.h>
__dpmi_regs r;
r.x.ax = 0x0013;
__dpmi_int (0x10, &r);
That's it! See sections 17.8 and 18.1-18.5 of the DJGPP FAQ for more
details about how to call real-mode services from a DJGPP program.
- Raw text -