Mail Archives: djgpp/2002/03/20/01:45:16
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 -