Return-Path: Received: (qmail 2589 invoked from network); 8 Jun 2002 03:00:41 -0000 Received: from warrior.services.quay.plus.net (212.159.14.227) by mailstore with SMTP; 8 Jun 2002 03:00:41 -0000 X-Priority: 3 X-MSMail-Priority: Normal Received: (qmail 3476 invoked from network); 8 Jun 2002 03:00:17 -0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Received: from post.thorcom.com (193.82.116.70) by warrior.services.quay.plus.net with SMTP; 8 Jun 2002 03:00:17 -0000 Received: from majordom by post.thorcom.com with local (Exim 3.33 #2) id 17GVRI-0006H6-00 for rsgb_lf_group-outgoing@blacksheep.org; Sat, 08 Jun 2002 02:54:48 +0100 Received: from imo-m04.mx.aol.com ([64.12.136.7]) by post.thorcom.com with esmtp (Exim 3.33 #2) id 17GVRH-0006Gt-00 for rsgb_lf_group@blacksheep.org; Sat, 08 Jun 2002 02:54:47 +0100 Received: from MarkusVester@aol.com by imo-m04.mx.aol.com (mail_out_v32.5.) id l.d3.ca7c955 (4364) for ; Fri, 7 Jun 2002 21:19:04 -0400 (EDT) From: MarkusVester@aol.com Message-ID: Date: Fri, 7 Jun 2002 21:19:03 EDT Subject: Re: LF: Programming !!!HELP!!! To: rsgb_lf_group@blacksheep.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 8bit X-Mailer: AOL 4.0.i for Windows 95 sub 72 Precedence: bulk Reply-To: rsgb_lf_group@blacksheep.org X-Listname: rsgb_lf_group Sender: Dear Brian, here comes the sniplet of QB45 code I use to directly access com port status lines and the other serial registers from a DOS-Box under Win98 and ME. The trick is that somehow Windows decides to give you the HW resources if you read the modem status register more than once, which I found out only by chance. Good luck es 73 Markus, DF6NM ========================================= ' RTS/DTR routines for Windows DOS BOX ' from morse1jm.bas by Markus Vester, DF6NM cp& = &H3F8 'COM1 cp& = &H2F8 'COM2 prepcom: i% = INP(cp& + 6): i% = INP(cp& + 6) ' works in Win98 DOS Box i% = INP(cp& + 6): OUT cp& + 4, 0 ' necessary for WinME IF i% = 255 THEN cp& = 0: PRINT "tx com port not available" ' read modem status twice to notify windows from dos box ! ' Windows ME needs 2 times read status ' 3rd read status is different from 255 ' and bit 4 (selftest) in modem control has to be reset! ' com port: rts=key, dtr=ptt, gnd ' DSUB9 Pin: 7 4 5 ' DSUB25 Pin: 4 20 7 RETURN rtshi: IF cp& THEN OUT cp& + 4, INP(cp& + 4) OR 2 RETURN rtslo: IF cp& THEN OUT cp& + 4, INP(cp& + 4) AND 253 RETURN dtrhi: IF cp& THEN OUT cp& + 4, INP(cp& + 4) OR 1 RETURN dtrlo: IF cp& THEN OUT cp& + 4, INP(cp& + 4) AND 254 RETURN