Exercise 2: Fixing a Missing Echo — Possible Solution ==================================================================== WHAT ACTUALLY HAPPENS ------------------------------ TRAP x20 ; GETC TRAP x25 ; HALT Per this chapter's own warn-box, GETC (TRAP x20) reads a character from the keyboard into R0 silently -- it never echoes what was typed to the screen on its own. The very next instruction is TRAP x25 (HALT), which immediately stops the fetch-decode-execute cycle. The learner will observe: the program reads their keystroke, then halts immediately, with NOTHING ever printed to the screen at all -- not the character they typed, not any other output. It will look like the program did nothing visible, even though it did correctly read their input into R0. THE FIX ------------------------------ TRAP x20 ; GETC — read the character into R0 TRAP x21 ; OUT — explicitly echo R0's character to the screen TRAP x25 ; HALT Inserting TRAP x21 (OUT) between the GETC and the HALT explicitly prints whatever character is currently sitting in R0 -- which is exactly the character GETC just read, since GETC's whole job is to place the typed character into R0. This matches the chapter's own stated fix: "if you want the typed character to actually show up, you have to explicitly follow it with TRAP x21 (OUT)." AN ALTERNATIVE FIX ------------------------------ Replacing TRAP x20 with TRAP x23 (IN) instead would also work, since IN reads AND echoes in a single call -- though it also prints its own prompt first, which GETC+OUT does not. WHY THIS WORKS AS AN ANSWER ------------------------------ It describes precisely what the learner will observe (silence, then an immediate halt) using GETC's own no-echo behavior from the chapter's warn-box, and supplies the exact one-instruction fix the chapter itself names, with a correctly ordered final sequence.