| 27 A table with all message codes can be found [below](#message-code-table). |
27 A table with all message codes can be found [below](#message-code-table). |
| 28 |
28 |
| 29 The datatypes used in the message payloads are as follows: |
29 The datatypes used in the message payloads are as follows: |
| 30 |
30 |
| 31 * BYTE — a single byte |
31 * BYTE — a single byte |
| 32 * WORD — two bytes integer (big-endian) |
32 * WORD — two bytes integer (little-endian) |
| 33 * DWORD — four bytes integer (big-endian) |
33 * DWORD — four bytes integer (little-endian) |
| 34 * MOVE — a data structure describing a move, consisting of |
34 * MOVE — a data structure describing a move, consisting of |
| 35 * a DWORD for the elapsed move time in seconds |
35 * a DWORD for the elapsed move time in seconds |
| 36 * a DWORD for additional elapsed move time in microseconds |
36 * a DWORD for additional elapsed move time in microseconds |
| 37 * a BYTE describing the moved piece (see below) |
37 * a BYTE describing the moved piece (see below) |
| 38 * a BYTE index for the file the piece was moved from |
38 * a BYTE index for the file the piece was moved from |
| 39 * a BYTE index for the row the piece was moved from |
39 * a BYTE index for the row the piece was moved from |
| 40 * a BYTE index for the file the piece was moved to |
40 * a BYTE index for the file the piece was moved to |
| 41 * a BYTE index for the row the piece was moved to |
41 * a BYTE index for the row the piece was moved to |
| 42 * a BYTE describing the selected piece for promotion (otherwise zero) |
42 * a BYTE describing the selected piece for promotion (otherwise zero) |
| |
43 |
| |
44 Note carefully that the byte order used by this protocol is little-endian while |
| |
45 the standard network byte order would be big-endian. But since the vast majority |
| |
46 of processors use little-endian nowadays, this protocol uses little-endian, too. |
| 43 |
47 |
| 44 The following table shows the possible values for the BYTEs describing a piece. |
48 The following table shows the possible values for the BYTEs describing a piece. |
| 45 |
49 |
| 46 | Piece | Value (Hex) | |
50 | Piece | Value (Hex) | |
| 47 |--------------|-------------| |
51 |--------------|-------------| |