Re: [PARPORT] Scanner - Primax PagePartner


Grant R. Guenther (grant@torque.net)
Sat, 7 Feb 1998 09:17:26 -0500 (EST)


> If this is correct then we will require some method which can intercept
> direct IO requests. Could someone correct me on this? Does DosEMU do
> this by using a "virtual machine" (that is every asm command is
> interpretted) and not executed by the CPU directly?

The x86 emulator for the Alpha works by interpretation, but DOSemu uses
the native vm86 mode of the processor.

I/O tracing is done by catching an exception: when the process in the
emulator attempts to do an in or out instruction, the processor faults
and calls the emulator, which then validates the operation (against the
"ports" clauses in dosemu.conf and a list of ports that is must emulate)
If access is permitted, the I/O permissions are modified and the instruction
is reissued.

As an aside, the exception handler can do extra things - I've occasionally
added code to emulate a write-only PP control register, because none of
my physical ports have this characteristic (if the control port lines can
be read back from the external device, they can be used in combination
with the status lines to get the so-called 5/3 modes - so I have to
break it to trace the real 4-bit modes.)

--------------------------------------------------------------------------
Grant R. Guenther grant@torque.net
--------------------------------------------------------------------------

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:25 EST