How to call a dos interrupt ? I want to change the screen mode.
I'm using DevC++
How to call a dos interrupt ? I want to change the screen mode.
I'm using DevC++
You could use inline assembly, like
Or you could use a function for thatCode:asm mov ah,0x00; asm mov al,0x13; asm int 0x10;
Note that this all is very compiler specific. I don't know if one of these or both work with DevC++.Code:union REGS regs; regs.h.ah = 0x00; regs.h.al = 0x13; int86(0x10, & regs, & regs);
[edit]The spaces between & and regs should be removed, but when I write them without spaces, this ®s happens.[/edit]
Last edited by Shiro; 05-20-2002 at 07:25 AM.
If I use the assembly code, it compiles but when run, crashes. The other code doesnŽt compile.
(using msvc++)
Could be. The first one is inline assembly in Boraland C, the second one uses a Borland C specific function.
The point was that you can use inline assembly or a specific function to call interrupts. How to do this is compiler dependent, consult the documentation of your compiler on how to do this.
Also see this thread: http://www.cprogramming.com/cboard/s...ight=interrupt
IŽll check it out...