Clarify PUSH_P / PUSH_R / POP_P / POP_R naming at first encounter

Part of #33.

The v6.S listing in the hello_world chapter introduces the PUSH_P,
PUSH_R, POP_P and POP_R macros without explicitly telling the reader
what the _P and _R suffixes stand for. For a reader reading the
chapter in order, the mapping is derivable: the book established
stp = "store pair" about 260 lines earlier, and the _R suffix falls
out by parallel with str. But a reader who jumped straight to v6.S
without reading the stp explanation (as Atcold did in issue #33) has
no such anchor and is left guessing.

One sentence at the "The push and pop macros simply save typing"
paragraph closes the gap: it names the _P / _R suffixes, connects
them to the already-taught stp / str convention, and costs a skimmer
nothing. The macro names themselves are unchanged; they were already
fine for an in-order reader, and renaming would have churned every
.S file in the book.
This commit is contained in:
Perry Kivolowitz 2026-04-19 02:26:19 -05:00
parent 3144bc6dbb
commit 52bf6eccd9

View file

@ -798,10 +798,12 @@ MAIN // 7
.end // 24 .end // 24
``` ```
The push and pop macros simply save typing but the other macros sense The push and pop macros simply save typing, continuing the `stp` /
if you are building on Linux or on Apple M family. In this case, the `str` (store pair / store register) naming you've already seen: the
macros are helping with underscores but the macro suite contains more `_P` suffix takes a register pair, the `_R` suffix takes a single
sophisticated helpers as well. register. The other macros sense if you are building on Linux or on
Apple M family. In this case, the macros are helping with underscores
but the macro suite contains more sophisticated helpers as well.
## Questions ## Questions