Path: utzoo!attcan!uunet!modcomp!kshaffer From: kshaffer@modcomp.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Why use MS-window ? Message-ID: <91800006@modcomp> Date: 1 Jun 90 16:19:00 GMT References: <10699@medusa.cs.purdue.edu> Lines: 25 Nf-ID: #R:medusa.cs.purdue.edu:10699:modcomp:91800006:000:860 Nf-From: modcomp.UUCP!kshaffer Jun 1 12:19:00 1990 > How do programs like Desqview or Windows 3.0 run communications > programs in background? > Don't say they just make the time slices Real Thin or something; > that doesn't work. In Windows 3.0 the foreground task is guaranteed > 50% of the CPU. In Desqview the minimum time-slice is an 18th > of a second and they recommend using bigger chunks than that. > But even an 18th of a second at 1200 baud is enough time to > drop 7 characters. So how do they do it? INTERRUPTS! You program the com chip and enable interrupts. On receive, When you get a character, stuff in a big enough (256 bytes) circular receive buffer. On transmit, take characters out of the transmit buffer and send down the line. Meanwhile when the communications program gets its time slice, the bytes are put in/gotten out of the appropriate buffers. Ken