Help with WIN32 protected mode & use of interrupts ..

so, ... i'm digging and digging in all directions but i just cant find the way to use standard asm interrupts in VC 6 .. my opinion is that when trying to use int 0x21 (dos interrupt, or whatever) programm crashes because win32 doesnt let you use that kind of coding...

so, my real question is how to (and if there is any) outsmart win32 and bypass that protected mode of his .... ? the answer to that problem will be so significant and valuable to me that no words can explain..

. my suggestion with which i'm still struggling is to compile cpp with fnc's that are using int's in borlandC 3.1 for DOS and to link with VC 6 . ((because i can normally start BC3.1 applications with use of int's in windowed mode in winXP and all is fine of course))

sorry for lenght but i'm desperate, ..
thanx


Comments

  • : so, ... i'm digging and digging in all directions but i just cant find the way to use standard asm interrupts in VC 6 .. my opinion is that when trying to use int 0x21 (dos interrupt, or whatever) programm crashes because win32 doesnt let you use that kind of coding...
    :
    : so, my real question is how to (and if there is any) outsmart win32 and bypass that protected mode of his .... ? the answer to that problem will be so significant and valuable to me that no words can explain..
    :
    : . my suggestion with which i'm still struggling is to compile cpp with fnc's that are using int's in borlandC 3.1 for DOS and to link with VC 6 . ((because i can normally start BC3.1 applications with use of int's in windowed mode in winXP and all is fine of course))
    :
    : sorry for lenght but i'm desperate, ..
    : thanx
    :
    :
    :
    [blue]In my opinion it is impossible to do. BC 3.1 source code with interrupts will not be compatible with VC++ 6. But, maybe you can replace some of the INT 21H calls with native Win32 calls... As far as I can know INT 21H is a service interrupt, not the timer/keyboard - which you have to replace to get the results.[/blue]
  • One reason it is not possible to use old DOS-style interrupts on Win32 machines is because the computer has been switched into protected mode by the OS, and those interrupts are just simply not available in that mode. The computer has to be switched back to real-mode to use them, and you don't want to do that. You could duel-boot your computer with the MS-DOS 6.X OS and the interrupts will be available, but of course windows will not.
  • Thanks greatly for that revalation ! But in a way i'm a bit disappointed in win32, cuz how can i do with ease all those beautiful fnc's like INKEY$ in QB and mouse routines (and i'm not talking about getchar cuz it's a way less useful then inkey (for me of course)) ...

    and of course i know how to do that in projects using MFC, but what when it comes to simple win32 console app ?
    --- thnx

  • [b][red]This message was edited by stober at 2003-2-28 5:16:10[/red][/b][hr]
    : Thanks greatly for that revalation ! But in a way i'm a bit disappointed in win32, cuz how can i do with ease all those beautiful fnc's like INKEY$ in QB and mouse routines (and i'm not talking about getchar cuz it's a way less useful then inkey (for me of course)) ...
    :
    : and of course i know how to do that in projects using MFC, but what when it comes to simple win32 console app ?
    : --- thnx
    :
    :


    Forget about those old MS-DOS ways of doing things. Toss that old compiler into the trash bin and get yourself a modern C++ compiler like the free gnu one from here:

    http://www.bloodshed.net/dev/index.html

    Then you use C functions like getche() getch() or use C++ classes like STL streams. Accessing the interrupts directly is unnecessary.



  • [blue]Also, try my [italic]xxiConsole[/italic] class from www.codexxi.com[/blue]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories