Serial Com

MARK LONGO mark.longo at canremote.uucp
Wed Nov 15 17:18:00 AEST 1989


  I am writing a small terminal program with quick`c'.  I am using the
libraries supplied by microsoft (bios_serialcom).  I do NOT WISH TO USE
A FOSSIL as this is a project , that forbids the use of one.

  My `SEND' routine works fine , but I am having trouble with the
receive part.  Basically what happens is that characters are not `all'
being read from the com port.

 For example.  If I type ATZ anbd and press return , i simply get K ,
instead of OK.  [at 1200/2400 bps] ... But at 300 bps .. I get `OK'

 When I call a BBS at 1200/2400 ... I can get most of what comes in ..
but not everything. Example:

   Please Enter Your Name:    , looks like:
   ease Enter Your Name:

 If I call at 300 bps , there is no problem.

 Now ... Is it because I do not have the serial buffer big enough, If so
, how do I set it bigger?

 Here is the BASIC idea behind my receive routine:

    unsigned int status;

    status = _bios_serialcom (_COM_STATUS,0,0);

    while (status&0x100)

    {
      status = _bios_serialcom (_COM_SEND,0,0);
      putch(status);
      status = _bios_serialcom (_COM_STATUS,0,0);
    }

  and that is it:  I tried using a If (status&0x100) , but still ... no
luck ... please help me out here!

    Mark Longo

 BOSS BBS 1-519-658-6433

---
 * Via ProDoor 3.1aR  Bit Systems ~ 330 megs ~ HST ~ Doors ~ (519)767-1755
 * RNet 1.02: CanConf ~ Bit Systems ~ Guelph ~ 519-767-1755 HST



More information about the Comp.lang.c mailing list