Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

In-Line Assembly in Visual C++ 4.2

0 views
Skip to first unread message

Robert Mobbs

unread,
Dec 24, 1996, 3:00:00 AM12/24/96
to

I have a question regarding in-line assembly in Visual C++ 4.2. The
problem I am having concerns the use of the "int 10h" command. This command
is causing my programs to segfault due to protected memory errors.
So my question is: how do I keep this from happening? Can anyone
offer a tip as to what bit I need to flip or option I need to check so that
a call to "int 10h" doesn't kill my program?

Thanks,
Robert Mobbs

- the opinions expressed herein are those of the author,
and not of Microsoft corporation


Unknown

unread,
Dec 24, 1996, 3:00:00 AM12/24/96
to

In article <59nhqf$g...@news.microsoft.com>, t-rm...@microsoft.com says...

> I have a question regarding in-line assembly in Visual C++ 4.2. The
>problem I am having concerns the use of the "int 10h" command. This command
>is causing my programs to segfault due to protected memory errors.

This is *not* a compiler/inline assembler problem.

The problem is that Win32 apps/DLLs are not allowed to issue sw interrupts,
since sw ints are x86-specific and Win32 API is supposed to be portable.

Whatever it is you're trying to do with INT 10h should be done instead in a
VxD. If you really don't want to write a VxD, you can instead put the INT 10h
call in a *16-bit* DLL, and write a flat thunk DLL in between the Win32 code
and the 16-bit DLL. Flat thunks are documented in the Win32 SDK, which also
includes the flat thunk compiler.

0 new messages