On (15 May 97) Devin Carlen wrote to All...
DC> The problem, specifically is with fossil routines in Win32
DC> environments. They make fairly extensive use of segments and
DC> offsets, and it's blowing my mind. :) Any suggestions on how to
DC> convert a segment and offset (or just a far pointer) to the Win32
DC> memory architecture!
You can't do it. I'm reasonably certain there's no such thing as a
FOSSIL for Win32, so even if you could convert the code itself, it
wouldn't do anything useful.
Instead, you can use the serial port drivers built into the Win32
implementation itself. Basically, you can simply do an OpenFile to
start using the port and use ReadFile and WriteFile to read and write
the port respectively. Typically you'll also use SetCommTimeouts to
adjust how reading the port works as well.
However, quite a bit of code for FOSSILS assumes its the only code
running on the machine so things like polling the port driver to find
whether there's input waiting is fairly common. On a multitasking
system, there are better ways of handling this. Under Win32, (much like
UNIX) you ask to read a certain number of characters, but also set the
timeout so it will read either until it has a full buffer, or it runs
out of time, at which point it'll return and tell you how many
characters it DID read.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)
|