delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/03/20/01:45:16

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: Dr Green <drgreen27_no AT spam_hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: any help with com port routines, please?
Message-ID: <41bg9u4pt78hq85ci9mlrv4jr041u8vb3u@4ax.com>
References: <embb9ugb5e4hvkg7puugclhucgi69to7ca AT 4ax DOT com> <Xns91D5ED750A415asu1cornelledu AT 132 DOT 236 DOT 56 DOT 8>
X-Newsreader: Forte Agent 1.9/32.560
MIME-Version: 1.0
Lines: 62
NNTP-Posting-Date: Wed, 20 Mar 2002 00:33:04 CST
Organization: Giganews.Com - Premium News Outsourcing
X-Trace: sv3-TS0nzyUnbo24QFKqxCfzmEJx+kr+vvkE7a/fGpJ7RTHE2xkFn29qnHiRTEbDviOaGLKRXjy5QpIPG9r!mZAVZzWmAGDkxl5k6HRq7tq2i+ADoAas8MElpLxOc+ZFxvA82RJLLAgTDLLYQAXVEaw=
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: Wed, 20 Mar 2002 06:33:04 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On 19 Mar 2002 04:20:37 GMT, "A. Sinan Unur" <asu1 AT cornell DOT edu> wrote:


>
>I really do not know much about these matters but I'll make a few comments. 
>Maybe they'll help.
>

>
>if this was compiled using a 16-bit compiler, these are meant to be 16-bit 
>values. with djgpp, change the declaration to unsigned short. 
>

That's a darn good point.  I'll change that and see if it has any
better results.


>
>this function looks a little wild to me. first, i do not understand the 
>need for the outer loop. second, it always returns 1 which, according to 
>the comment, signifies an error value. i am stumped.
>

I found the same issue with that loop.  I think the original
programmer was hoping to update all of the scoreboard values
(time,score,etc) with one update, but that didn't work, so he limited
it to a single character/byte, but left the buffer declaration.


>
>I am assuming the XORing provides a checksum value to the board. the value 
>of db1 selects functionality. i just don't know what that functionality is 
>:)
>
>also, port is a global variable. presumably, it being set according to some 
>command line option. see below ...
>

XOR definitely has to be the checksum, and i'm in the same boat, i
don't know what the db1 does, cuz in the entire source file, the
function was only called with db1 = 0x00, so it never even used the
other set of code.

>
>you want to change this to unsigned short for the port again because of the 
>16-bit versus 32-bit difference. assuming the macros or constants such as 
>COM1, LSR1 etc ... are defined properly elsewhere, this function should 
>compile with djgpp.
>

Again, i'll change those declarations and double check the local
defines for that same type disparity.

>
>i know i didn't say much that is useful. here is my best attempt at getting 
>something that at least compiles with djgpp.
>

Every bit helps.  Thanx!

dr green

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019