🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6623

Re: BC++ & Serial IO - is there an easy way?

#6623
From: Ian D. Gay
Date: Sun, 22 Nov 1992 05:04
27 lines
1836 bytes
s1110238@giaeb.cc.monash.edu.au (Lee Hollingworth) writes:

>mjr@ursa.calvin.edu (Matt Ranney) writes:

>>I'm using BC++ 3.1, and I'm trying to write a program that does some
>>simple serial IO at 9600 baud on COM1.  I typed in the bioscom example
>>from the book, but that doesn't work.  Every time it goes to send a
>>character, the machine hangs for like 2 seconds, and it never thinks
>>there is any data waiting to be read.  It does this on every machine
>>I've tried it on, although they are all the same kind of machine:
>>386sx's.  Has anybody else had this problem?

>I do not use BC++, however the source of your problem may be the fact
>that you are trying to use 9600 baud, for polled serial communications.

>Using this method the data speed should be limited to 1200 bps.  For
>speed greater than this you need to install an interrupt handler to
>handle interrupts generated by your serial port.

This is not correct, the bios routines work ok at 9600 even on a 5MHz 
XT, if you're not trying to do something else at the same time. (In 
which case you do need interrupt-driven I/O).

The source of the problem is most likely that whatever your comm port 
is connected to is not asserting DSR and CTS. The bios routine will 
not transmit until these signals are both high, and just times out in 
a second or two, without transmitting anything, if they never go high.
Technical Details
Message-ID: <gay.722408687@sfu.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!van-bc!cs.ubc.ca!newsserver.sfu.ca!sfu.ca!gay
References: <mjr.722383467@ursa> <s1110238.722393168@giaeb>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!van-bc!cs.ubc.ca!newsserver.sfu.ca!sfu.ca!gay
From: gay@beaufort.sfu.ca (Ian D. Gay)
Subject: Re: BC++ & Serial IO - is there an easy way?
Message-ID: <gay.722408687@sfu.ca>
Sender: news@sfu.ca
Organization: Simon Fraser University, Burnaby, B.C., Canada
References: <mjr.722383467@ursa> <s1110238.722393168@giaeb>
Date: Sun, 22 Nov 1992 05:04:47 GMT
Lines: 27