Valhalla Legends Archive

Programming => Battle.net Bot Development => BnetDocs Research and Discussion => Topic started by: R.a.B.B.i.T on July 09, 2005, 11:34 PM

Title: Conventions
Post by: R.a.B.B.i.T on July 09, 2005, 11:34 PM
Specifically running out of this thread (http://forum.valhallalegends.com/phpbbs/index.php?topic=12157.0), but also from this one (http://www.x86labs.org/forum/index.php?topic=1201.45).  I recommend changing the xWORD notations on BnetDocs, and stating so.  A lot of people are being brainwashed into learning the wrong definitions of fundamental binary protocol terms (WORD, DWORD, etc..)

It'll be a big leap, but change is good :)
Title: Re: Conventions
Post by: MyndFyre on July 09, 2005, 11:46 PM
Perhaps to U8, U16, U32, U64 and Sxx as appropriate for unsigned/signed?
Title: Re: Conventions
Post by: R.a.B.B.i.T on July 10, 2005, 12:01 AM
That's the kind of initiative we need :)
Title: Re: Conventions
Post by: MyndFyre on July 10, 2005, 02:22 AM
Quote from: rabbit on July 10, 2005, 12:01 AM
That's the kind of initiative we need :)

I don't mind going through all the pages and doing that (I have LOTS of free time at work), as long as the other editors are okay with it.
Title: Re: Conventions
Post by: Arta on July 10, 2005, 07:43 AM
I'm not sure about that. I'd say that the current notation is a fairly established convention. How many people are confused by it?
Title: Re: Conventions
Post by: R.a.B.B.i.T on July 10, 2005, 10:25 AM
It's not so much confusing as just plain wrong.  The way everything is listed now assumes that all bots are made on 16-bit platforms, and then this (http://bnetdocs.valhallalegends.com/content.php?Section=d&id=4) just gives the wrong definitions.

In essence, changing the notations to match what actually needs to be done would be fixing an assload of typos.
Title: Re: Conventions
Post by: LivedKrad on July 10, 2005, 12:29 PM
Well, if we're going for clarity here, I'd say changing it to what is "right" would actually confuse people even more. Keeping it simple *nearly* guarantees that we're preserving BnetDocs's goal.
Title: Re: Conventions
Post by: Eric on July 10, 2005, 12:58 PM
I agree with Arta & LK, it's a standard and changing it to anything else would only cause additional confusion.
Title: Re: Conventions
Post by: R.a.B.B.i.T on July 10, 2005, 03:29 PM
The people who be affected the most would probably not know the difference anyway, or only be copying code.  If it was changed to be correct, anyone who knew what was going on could adapt easily.
Title: Re: Conventions
Post by: MyndFyre on July 10, 2005, 07:03 PM
Quote from: rabbit on July 10, 2005, 10:25 AM
It's not so much confusing as just plain wrong.  The way everything is listed now assumes that all bots are made on 16-bit platforms
Not necessarily.  I've been told that a word is 16 bits on any platforms (ref: college assembly class), and that the order is this: bit (1 bit), nibble (4 bits), byte (8 bits), word (16 bits), double word (32 bits), quad word (64 bits).  Those are the conventions that I've always assumed (correctly) were in place on BnetDocs.
Title: Re: Conventions
Post by: Arta on July 10, 2005, 07:20 PM
Og course, if/when we switch to XML, we can display the types according to the preference of the user :)
Title: Re: Conventions
Post by: LivedKrad on July 10, 2005, 09:38 PM
Quote from: Arta[vL] on July 10, 2005, 07:20 PM
Og course, if/when we switch to XML, we can display the types according to the preference of the user :)

Og Arta says, Og.
Title: Re: Conventions
Post by: Hdx on July 11, 2005, 01:08 AM
Quote from: Arta[vL] on July 10, 2005, 07:20 PM
Og course, if/when we switch to XML, we can display the types according to the preference of the user :)
*votes for this format*
I know that It's annoying to have the wrong deffinition of a word. It makes you look like a retard when your talking to someone who does know it. But considering BnetDocs has This (http://bnetdocs.valhallalegends.com/content.php?Section=d&id=8) We are good for now. But wait untill it uses XML. That would be a good feature.
~-~(HDX)~-~
Title: Re: Conventions
Post by: LivedKrad on July 11, 2005, 07:04 AM
Wrong definition?
Title: Re: Conventions
Post by: Hdx on July 11, 2005, 07:53 AM
I Should say Incompleet insted.
~-~(HDX)~-~
Title: Re: Conventions
Post by: Arta on July 11, 2005, 09:00 AM
Incomplete how?
Title: Re: Conventions
Post by: Hdx on July 11, 2005, 05:14 PM
QuoteA word is the standard unit on a machine.  A word on a 16-bit machine is 2 bytes, on a 32-bit machine it's 4 bytes, and on a 64-bit machine it's 8 bytes.
We only get the bolded parts:
QuoteWORD     A 16-bit unsigned little-endian integer.
It tells nothing about the type of machine affecting it's size.
~-~(HDX)~-~
Title: Re: Conventions
Post by: MyndFyre on July 11, 2005, 06:47 PM
Quote from: HdxBmx27 on July 11, 2005, 05:14 PM
It tells nothing about the type of machine affecting it's size.
Like I said, though, it depends on whom you ask.  My college prof would have told you that a word is 16 bits, period.  Interestingly, in 32-bit MASM, a WORD is still a 16-bit integer:
http://crystal.uta.edu/~vasudeva/teaching/cse2312_summer05/lectures/lecture7/notes.html#L9_B31.
I have to wonder that if a WORD wasn't a 16-bit value, how would an assembler define a 16-bit value?  The mneumonic is "dw", for "define word".  To define a 32-bit value, it's "dd", for "define doubleword".  Etcetera.
Other links:
http://cs.wwc.edu/~aabyan/Unix/x86.html (do a search for "dw" to find it).
http://www.cs.uwc.ac.za/~iventer/Courses/cos365/AssemblyTheory/Assem40Lang.htm
Title: Re: Conventions
Post by: LivedKrad on July 11, 2005, 08:21 PM
It sounds to me like all of this can be solved by allowing preference.
Title: Re: Conventions
Post by: R.a.B.B.i.T on July 11, 2005, 09:09 PM
Anyways, Kp backs me up unwittingly (http://forum.valhallalegends.com/phpbbs/index.php?topic=12149.msg120284#msg120284), but yes, I say go with XML so people can have what they want :)