Thanks,
Robert Mobbs
- the opinions expressed herein are those of the author,
and not of Microsoft corporation
> 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.