X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Dr Green Newsgroups: comp.os.msdos.djgpp Subject: any help with com port routines, please? Message-ID: X-Newsreader: Forte Agent 1.9/32.560 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 155 NNTP-Posting-Date: Mon, 18 Mar 2002 03:09:33 CST Organization: Giganews.Com - Premium News Outsourcing X-Trace: sv3-5F9I5SIuQrja1gqQ9SYjhj2+sZEqEyBI9Dg0j9Atfp2+/jqH224ieuZPGE/012gFMsYmYB0Ihy8b5ZC!814FfCVauVBtd3Ksf6hClNVZkC2W4TIsSrgyt1qO+RERG7JbyuXybkAcTA/tpOymJHo= X-Complaints-To: abuse AT GigaNews DOT Com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly Date: Mon, 18 Mar 2002 09:09:33 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello all. I've also posted this to the msdos.programmer newsgroup, with no response. I was just hoping someone here might recognize some of this code and be able to help me out. Thanx! I have a program that controls a sports scoreboard. The program was written 9 years ago by a since-extinct person. The scoreboard was also built by this person, so it probably doesn't follow any protocol standards. In a recent tragedy, we lost the program. But we managed to find the source to an older version. I need to compile it, and would prefer to rewrite it in windows. Problem: I do not have the compiler or libraries that this was built with. I do not know enough about the com functions of old (talking directly with the chips on the comport card). I've tried using watcom c 11.0c with _bios_serialcom() but that just hangs the machine. I humbly beg of you... if any of you can help me interpret this code and/or rewrite it to use libraries that are currently available (ie. watcom or even ms c++/vb), i would most appreciative. thanx, dr green Here is the routines in question: /*********************Update Scoreboard*****************************/ void UpdateScoreBoard(void) { unsigned val, ads; /* each digit is it's own item */ val = ( ClockMin / 10 ) % 10; /* i'm assuming this is some address in the memory on the scoreboard chip, but who knows... */ ads = 0 + 0xC100; if(val==0) val=15; dbpoke(ads,1,val); val = ClockMin % 10; ads = 1 + 0xC100; if(val==0) val=15; dbpoke(ads,1,val); /* etc... */ } /* write "count" words from "buffer" to address "address" in the remote data base over the rs232 bus. returns "0" if no error else "1". does a read after write verify. */ int dbpoke(unsigned address, unsigned count, unsigned buffer[]) { unsigned tbuff[64]; int i, j; flush(port); for(j=0; j<1; ++j) { for(i=0; i