From: Rob Austein Sender: sra AT epilogue DOT com To: djgpp AT sun DOT soe DOT clarkson DOT edu Cc: sra AT epilogue DOT com Subject: Passing data streams through GO32 to/from DEMACS Date: Sun, 18 Oct 92 1:16:57 EDT There are two things I'd really like to add to DEMACS: 1) A "reasonable" keyboard driver (ie, one that understands the concept of bucky bit combinations like C-M-a). Can't be done right with DOS or BIOS calls due to IBM braindamange. 2) The open-network-stream stuff for TCP connections, maybe along with the equivalent UDP stuff from Epoch. Both of these problems basicly come down to how to deal with asynchronous events (key press/release or incoming network packets) in GO32 and pass the resultant data up to the 32-bit arena where DEMACS can do something useful with it. For (1) the easiest way to do this is probably as a queue of scancode events, ie, just capture the raw data from the keyboard hardware and pass it up to DEMACS for further processing. No data needs to pass the other way. For (2) the traffic is both ways, with data packets passing both in and out of DEMACS, so I need a way for 32-bit code invoke a real-mode routine with a data buffer as an argument as well as the reverse. I know a fair amount about (D)EMACS and TCP/IP, and have friends who claim they can write 16-bit mode hardware keyboard drivers in their sleep. What none of us understand is how we should go about passing data between the 16-bit real mode and the 32-bit protected mode worlds, or how to transfer control back and forth between the two modes. I'm reasonably certain that DJ has explained all this in the documentation supplied with the compiler, but I don't know enough about DOS or the 386/486 to make sense out of it. Any help would be appreciated. This is a free-time project, so there's no particular hurry. Working code examples would be especially welcome. Thanks. --Rob Austein