News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Converting 16bit to 32bit(str_remove program)

Started by Syre Lancaster, October 05, 2013, 03:09:43 AM

Previous topic - Next topic

Paulo

Quote from: dedndave on October 06, 2013, 12:52:23 AM
sorry about that, Paulo
i am an old fart - seems like everything is an afterthought - lol

:t I know the feeling well.  :biggrin:

@vertograd

I think software INTs under Win32 are emulated in NTVM when one runs 16 Bit code? is that correct?

GoneFishing

#31
...

dedndave

that's correct
you are running in protected mode
and - INT's are allowed in ring 0

NTVDM emulates them so that most old 16-bit code can work in a protected environment
(New Technology Virtual Dos Machine)

MichaelW

Quote from: dedndave on October 06, 2013, 03:49:21 AM
NTVDM emulates them so that most old 16-bit code can work in a protected environment

And the same for 32-bit DOS apps.

Well Microsoft, here's another nice mess you've gotten us into.

japheth

Quote from: Paulo on October 06, 2013, 01:04:04 AM
I think software INTs under Win32 are emulated in NTVM when one runs 16 Bit code? is that correct?

Not necessarily. It's always true for 80386 and 80486 cpus, but beginning with the Pentium, there exists a flag in CR4, called VME. In short, this flag, in conjunction with a bit-table in the current TSS, allows to avoid leaving V86-mode if a software INT is executed.

See for example http://www.rcollins.org/articles/vme1/VME_Overview.html.

Hardware interrupts and exceptions are not affected by VME, and since  the OS does also not allow I/O-port access in ring 3, there is no security problem.