Path: utzoo!attcan!uunet!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!unixhub!shelby!msi.umn.edu!noc.MR.NET!ns!logajan From: logajan@ns.network.com (John Logajan) Newsgroups: comp.sys.atari.st.tech Subject: Re: How do I detect the presence of a carrier? Message-ID: <1990Oct20.042911.7249@ns.network.com> Date: 20 Oct 90 04:29:11 GMT References: <65827@iuvax.cs.indiana.edu> Organization: Network Systems Corporation Lines: 81 kclenden@silver.ucs.indiana.edu (Kevin Clendenien) writes: >I actually want to know if >I've lost the carrier during a modem connection. Also, what do >the parameters UCR, RSR, TSR, and SCR represent in the call to >the XBIOS when configuring the RS232 port? Controlling the RS232 port from GFA Basic. An actual example. Void Xbios(15,7,0,&H88,1,1,-1) ! RS232 configuration/baud rate. (See below.) Rem Rem Configure RS232 - Xbios(15,baud,ctrl,ucr,rsr,tsr,scr). Rem baud = 0/19200, 1/9600, 4/2400, 7/1200, 9/300, 13/110. Rem ctrl = 0/None, 1/XOFF-XON, 2/RTS-CTS(doesn't work), 3/both. Rem ucr = 8bits, 1stop, noparity. Rem rsr = recv enabled. Rem tsr = xmit enabled. Rem scr = not used. Rem Note the use of -1, above, to RETAIN current variable settings. 0 19200 1 9600 2 4800 3 3600 4 2400 5 2000 6 1800 7 1200 8 600 9 300 10 200 11 150 12 134 13 110 14 75 15 50 ucr bits: 0 not used 1 0=odd 1=even parity 2 0=no parity 1=parity 3,4 (in 4,3 order -->) 00-sync,01-async/1stopbit,10-async/1.5,11-2stopbits 5,6 (6,5 order) 00-8bits,01-7bits,10-6bits,11-5bits. 7 0=direct clock, 1=divide by 16 (use div/16 to get correct baud rates!) rsr bits: 0 1=receiver enable 1 1=syncronous strip? 2 1=start bit detected 3 1=break detected 4 1=frame error 5 1=parity error 6 1=overrun error 7 1=buffer full tsr bits: 0 1=transmitter enable (else see state below!) 1,2 (2,1 order) 00=output high,01=high,10=low,11=loop back. 3 1=force break 4 end of transmission ? 5 auto turnaround ? 6 1=underrun error 7 1=buffer empty scr: Some sort of syncronous data i/o port. Peek(&HFFFA01) Bit 0: Centronics busy Bit 1: RS232 data carrier detect - input <<<<<----- *this is it* * * * Bit 2: RS232 clear to send (CTS) - input Bit 3: reserved Bit 4: keyboard and MIDI interrupt Bit 5: FDC and HDC interrupt Bit 6: RS232 ring indicator Bit 7: Monochrome monitor detect (1=color) -- - John Logajan @ Network Systems; 7600 Boone Ave; Brooklyn Park, MN 55428 - logajan@ns.network.com, 612-424-4888, Fax 612-424-2853