Commit graph

13 commits

Author SHA1 Message Date
Perry Kivolowitz
88c8f496c4 Document hex dump display convention in alignment chapter
Closes #22.

The alignment chapter's hex dump examples (e.g. "0011 eeff ccdd aabb"
for a little-endian long initialized to 0xaabbccddeeff0011) are correct
under the default hexdump(1) output convention: bytes grouped into
16-bit little-endian words, each word printed most-significant byte
first. But the chapter never told the reader which convention was in
use, so a reader reproducing the example with xxd or hexdump -C (both
byte-oriented, showing raw memory order) would get a different-looking
result and conclude the book had an endianness bug. That is exactly
what issue #22 reported, and it is also part of what the #33 filer
flagged as "there are no instructions about how to do such a thing"
for hex dumps in this chapter.

Fix: one new subsection "A Note on Hex Dumps" placed before Example 1,
stating the convention explicitly and warning xxd / hexdump -C users
that the bytes within each pair will appear swapped relative to the
examples. The examples themselves are unchanged; they were already
self-consistent under the word-oriented convention.

Rejected alternative: rewriting all the examples in byte-oriented
(xxd) form. That would have matched what most modern readers reach
for, but would also have required regenerating every hex dump in the
chapter and losing continuity with any reader who already absorbed
the current notation. A single explanatory paragraph is less invasive
and teaches the distinction, which is useful in its own right.

No test coverage applies; this is prose.
2026-04-19 02:20:10 -05:00
Perry Kivolowitz
776ebc0545 improvements to text 2024-02-28 16:40:12 -06:00
Perry Kivolowitz
144acfb9d6 improved text 2024-02-28 16:12:29 -06:00
Perry Kivolowitz
7c896ef362 adde pdf 2024-02-28 10:48:54 -06:00
Perry Kivolowitz
697a9c0e87 WTF was I thinking before? 2024-02-28 10:47:55 -06:00
Perry Kivolowitz
d62f2e5de3 added this 2023-05-17 10:38:24 -05:00
Perry Kivolowitz
9ad792ddfe added MOD to apple-linux 2023-03-31 09:42:08 -05:00
Perry Kivolowitz
de40ccf20d added structs/practice.S 2023-03-04 15:10:27 -06:00
Perry Kivolowitz
b153fad576 updated PDFs 2023-01-18 08:26:45 -06:00
Perry Kivolowitz
f6d91cbc26 first pdfs 2023-01-16 18:03:40 -06:00
pkivolowitz
bb1bee8c2c
benefit of .struct 2022-11-03 10:40:39 -05:00
Perry Kivolowitz
625d3deaad added structs 2022-06-11 16:26:29 -05:00
Perry Kivolowitz
535e581f05 discussion of alignment including little endianess 2022-06-11 12:16:27 -05:00