Exercise 3: Why ADD A,(HL) Is a Genuinely CISC-Style Trait — Possible Solution ==================================================================== WHAT ADD A,(HL) ACTUALLY DOES IN ONE INSTRUCTION ------------------------------ Per cpu8bit1-7's own explanation, (HL) is a register-indirect memory read — it fetches whatever byte is stored at the address HL currently holds. ADD A,(HL) doesn't just fetch that value; it ALSO adds it directly into the accumulator, all within the execution of a single instruction. That's two logically distinct operations — a MEMORY ACCESS and an ARITHMETIC COMPUTATION — fused into one instruction the CPU fetches, decodes, and executes as a single unit. WHY THIS IS A CISC-STYLE TRAIT ------------------------------ Per this chapter's own definitions, CISC design favors instructions that do more work per instruction, sometimes explicitly combining memory access with computation rather than keeping the two cleanly separated. ADD A,(HL) is exactly that: it lets a Z80 program add a value straight from memory to the accumulator without ever needing a separate step to first load that value into a register. HOW THE 6502 WOULD HAVE TO EXPRESS THE SAME OPERATION ------------------------------ The 6502's own load/store discipline (this chapter's own RISC-hallmark row) forbids ALU instructions from touching memory directly at all — per cpu8bit1-4's own material, a value has to be loaded into a register FIRST, and only then can an ALU instruction like ADC operate on it. The same logical operation ADD A,(HL) performs in one Z80 instruction would need at least two separate 6502 instructions: LDA (some zero-page pointer),Y ; first, load the value into A ADC SOMEWHERE ; separately, add a second value or, more directly comparable, loading the pointed-to byte into a register before adding it — the memory access and the arithmetic can never be the SAME instruction on the 6502 the way they can on the Z80. WHY THIS WORKS AS AN ANSWER ------------------------------ It identifies the two distinct operations ADD A,(HL) fuses together (memory read + arithmetic), ties that fusion directly to this chapter's own stated CISC hallmark (instructions combining multiple operations), and contrasts it concretely with the 6502's own load/store discipline, which structurally forbids the same fusion from ever happening in a single 6502 instruction.