From Jerry Coffin · 1996-04-04 07:50 · #73554 in EMULATE
On (02 Apr 96) Mike Bilow wrote to Darin McBride...
MB> Jerry is wrong on that one. Under native OS/2, you never call a
MB> software interrupt directly.
Most OS/2 programs never have a reason to do so, just as the vast
majority of Windows programs have no reason to do so. By rights under
either one, only device drivers should do that sort of low-level access.
However, if you want to badly enough, you can break the rules and do so
under either one. Under OS/2 the interrupts that are available, and the
parameters you need to supply are considerably different. But there are
still some that can come in handy occassinally.
MB> Under Windows 95, you still have DPMI
MB> available, so you could use that to call a software interrupt if you
MB> chose. (A DOS progream under OS/2 could also use DPMI, but not an
MB> OS/2 program.)
However, DPMI is NOT the only possible reason one would use interrupts.
Under OS/2 you can accomplish a few things via direct use of interrupts
that otherwise require device drivers.
However, there are definitely still interrupts used for internal
"function calls", and they're used on a fairly regular basis at that.
In case it should happen to come up, there's an even grungier method
Windows uses for some of its internal communications. It basically
loads a function number in a register, and then intentionally executes
an illegal instruction, causing a switch to ring 0. The interrupt
handler then gets the function number and executes appropriate code.
As odd as it sounds to many who like to think of OS/2 as being much
cleaner than Windows internally, this technique was actually invented in
the development of OS/2 2.0 and is patented by IBM. Not only is it
apparently still used in OS/2 Warp, but reputedly (I haven't looked
personally) even the microkernel version for the PowerPC uses a similar
technique as well.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
* Origin: Point Pointedly Pointless (1:128/77.3)