News for hackers. Stuff that matters.
Re:Byte Ordering: On Holy Wars and a Plea for Peace (1980) by nine_k on Monday September 16, 2024 @05:56AM (#41554446)
It was / is a very straightforward question. Given this C fragment:

  u16 x = 1;
  u8 * px = (u8 *)&x;
What byte does px point to? LSB orders means that it points to the least significant byte (that has value 1); MSB order means it points to the most significant byte (value 0).
Re:Byte Ordering: On Holy Wars and a Plea for Peace (1980) by Y_Y on Monday September 16, 2024 @06:54AM (#41554763)

    int* x; // x is an int-pointer
    int *y; // dereferencing y gives an int
    int * z; // int multiplied by z

I'm being silly, but floating the the asterisk between the type and the identifier gives me the same feeling as the "array indices start at 0.5" compromise mentioned earlier.

(For the record, the second way is the universal and objective truth.)

Re:Byte Ordering: On Holy Wars and a Plea for Peace (1980) by ireflect on Tuesday September 17, 2024 @12:13AM (#41564033)
But when you say "the second way" are you counting from zero or from one?