CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2001
    Posts
    6

    Can I still use Dos interrupt???

    I am trying to compile my program with a little
    part of asm code.It looks like when I call dos
    interrup,it crashed.the error message is like:
    can not read that memory...
    Anybody knows this?
    ps:Is there anybody using dos interrupt in your c++ program?

    Thanks


  2. #2
    Join Date
    Apr 2000
    Location
    San Francisco, California, USA
    Posts
    4,467

    Re: Can I still use Dos interrupt???

    DOS interrupts don't work in Win32 applications. Use Win32 API instead.

    Russian Software Development Network -- http://www.rsdn.ru

  3. #3
    Join Date
    Aug 1999
    Location
    Canada
    Posts
    2,076

    Re: Can I still use Dos interrupt???

    You can't call interrupts from WIN32 directly. INT is privilege instruction ( like direct I/O access using in,out instruction....etc) To simulate an interrupt under 9x take a look to VMMcall and VDD in MSDN.

    For example MSDOS function Get Version (INT 21h, Function 30h):

    mov ax, 3000h
    push dword ptr 21h
    VMMcall Exec_VxD_Int

    Result is:
    in AL is major DOS version
    in AH is minor DOS version


    On NT you must write driver.







Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured