News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Calling 16bit interrupts with DPMI from 32bit c++

Started by armiof1, August 16, 2010, 03:18:22 AM

Previous topic - Next topic

armiof1

Hi all, is it possible to call a 16bit interrupt from 32bit c++ inline code using DPMI in windows 7. I have seen a snippet that uses 32 bit and 16 bit dll's to do a thunk. could that be skipped in favor of an inline __asm block. Thanks in advance.

dedndave

i doubt that'll fly
win32 kernel has no INT 2xh service routines or handlers
even if it did, it would require ring 0 access to execute the INT
BIOS has changed over the years, as well - i haven't kept up with it

armiof1


armiof1

So im thinking i will have to go through the system32 API's to do anything low level.

hutch--

Yes and be thankful, the API is far more powerful than DOS interrupts.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

armiof1

Just to be clear are the 16bit interrupts dead in favor of API call or are there certain current situations ie. program implementations in which they can be used.

dedndave

if you write a 16-bit program, they are emulated through NTVDM.exe
i have ran some fairly complex old stuff that seems to run ok
note that no 64-bit OS's support 16-bit programs - 32-bit OS's seem to be ok with it
that does not allow you to hop back and forth between the 32-bit API and 16-bit INT's
i suppose someone with enough desire could figure out NTVDM and make something happen
probably more work than it's worth