Path: utzoo!attcan!uunet!mcvax!ukc!reading!cf-cm!sme From: sme@computing-maths.cardiff.ac.uk (Simon Elliott) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Remote control of PC via modem Summary: ctty com1 isn't enough Message-ID: <579@cf-cm.UUCP> Date: 7 Dec 88 10:34:45 GMT References: <4652@phoenix.Princeton.EDU> <12630002@hpcupt1.HP.COM> Organization: University of Wales College of Cardiff, Cardiff, WALES, UK. Lines: 35 In article <12630002@hpcupt1.HP.COM>, williamo@hpcupt1.HP.COM (William O'Shaughnessy) writes: > The primary thing you want to do is switch your console to com1. > This is done with the ">ctty com1" command. This should be imbeded > in your autoexec.bat file along with some other important steps. > This guarantees that it will be redone if there is a power outage > at the remote site. > [stuff deleted about setting baud rate using MODE, etc] The ctty command will work for well-behaved programs only, but you all knew that, didn't you? The important thing, though, is that the default COM1 device does no buffering, and polls the serial port for i/o. This makes CTTY COM1 pretty frustrating and unusable, 'coz you lose characters. If you really want to use CTTY, it's advisable to replace the COM1 device driver with something that uses interrupt-driven, buffered i/o. Actually, you wouldn't need to have a complete device driver; you could capture interrupts 0Bh & 0Ch (for hardware interrupts) and interrupt 14h (the serial port BIOS s/w interrupt). You'd have to enable interrupts 0B and 0C at the 8259 interrupt controller and at the 8250 UART also. The interrupt handlers would co-operate to manage buffered i/o, and setting the baud rate etc could be done by chaining to the original BIOS handler. Anyone seen/got any code to do this? I dimly recall an article in an old Dr Dobbs (c. 1986). -- -------------------------------------------------------------------------- Simon Elliott Internet: sme%v1.cm.cf.ac.uk@cunyvm.cuny.edu UWCC Computer Centre JANET: sme@uk.ac.cf.cm.v1 40/41 Park Place UUCP: {backbones}!mcvax!ukc!reading!cf-cm!sme Cardiff, Wales PHONE: +44 222 874300