[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

computer-go: Re: Value of QUERYSTRING in Go Modem Protocol



Francois Grieu was asking if the correct value
for the constant QUERYSTRING is 0x200 or 0x400.

My guess is: 0x200.

This is based on the following

A) 0x200 is the value on Bruce Wilcox's current website.

B) In the sample code refered, the value of QUERYSTRING is
  used in switch statements where the control value is the
  sqqqqqqqqq  field of a QUERY command
       Query command- 1011 0sqq 1qqq qqqq
  [note the middle 1 is stripped from the control value]
  Clearly, the value 0x400 can't be reached and is a typo

B) Definition of the QUERY command says
    Query command- 1011 0sqq 1qqq qqqq   (..)
    Bit s is on if the question is
       "Do you support extended command q?"
  so 0x200 would ask  "Do you support extended command 0 ?"
  which happens to be "String", hence the name QUERYSTRING.
  Same for QUERYMULTI.

Note that the original code (QUERYSTRING 0x400) never answers
queries for support of extended commands, and the corrected one
(QUERYSTRING 0x200) only answers for extended commands 0 and 15,
although the protocol definition is explicit that any such query
should be answered including (negatively) for unknown extended
commands.  At least, this is what other implementations of the
GMP do, including cgoban-1.9.8 and gnugo-2.7.22.

Also, there is a misleading comment in the source code:
*   3 - Query.  Value is:
*       1EEEEEEE - Do you support extended command E?
*           Respond with 0x0f: Yes, 0: No
one should change  1EEEEEEE
             to 1EEEEEEEEE
to get something meaningfull and matching what existing
implementations actually perform.


Joe Author.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com