On Sun, 2 Nov 2003 10:54:32 -0800 (PST), Robert Komar wrote:

>
> The fuser command might help you find out if another process
> is using /dev/ttyS0.
>

   I tried fuser and it reported that the only PID using /dev/ttyS0 was
the one that was shown by ps as running dosemu.bin.

   I have written a very simple piece of Turbo Basic code running in
DOS under DOSemu that I've put together to drive 'COM1'. I've made
an interesting discovery:

   1.  I can write a 1 or a 0 to bit 1 of the UART's MCR register to
       control the RTS line and the actual hardware output line (as
       measured on the D-type connector with an oscilloscope) faithfully
       follows whatever I write to the MCR bit.

   2.  Having set the RTS bit in the MCR to 1 or 0, I can read the
       contents of the MCR back and check that the bit that I've just
       written is correct.

   So far, so good. But....

   3.  Having set the RTS bit in the MCR to 1, subsequently writing a
       character to the TX register results in the actual hardware RTS
       line from the UART being reset as the character comes out of
       the hardware TX line.

   4.  Now if I read back the value from the MCR register, it STILL
       indicates that RTS is set, although the actual hardware has
       reset it.

   Assuming that COM1 as seen by DOS programmes running under DOSemu
(with the settings as I have them in  /etc/dosemu/dosemu.conf) is an
emulated UART, it seems that DOSemu is actually NOT emulating the
operation of the UART correctly, but is corrupting the content of the
hardware UART's MCR register (and therefore the RTS output) somehow as
it transmits.

   The same piece of code run under native DOS on a DOS box works
exactly as expected, with the RTS line staying as set whilst characters
are transmitted.

   Now I'm stuck!! Please could someone look into this UART emulation
part of DOSemu and confirm what my experiments indicate? Best of all,
please, PLEASE could it be fixed?

   Any help will be very gratefully accepted, as I'm getting desperate
to get this DOS thing running under Linux!

   Cheers,

      Gerald.

-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to