Exercise 1: Why RET Needs No Dedicated Opcode — Possible Solution ==================================================================== WHY NO SEPARATE OPCODE IS NEEDED ------------------------------ Per the chapter's own JMP bitfield diagram, JMP's encoding is just an opcode (1100) plus a 3-bit BaseR field naming which register to jump to -- the CPU doesn't distinguish "jump to R7 specifically" from "jump to any other register" at the hardware level. Since RET's ENTIRE job is "jump to whatever address is in R7," that behavior already exists inside JMP's general definition -- there's no additional capability RET needs that JMP doesn't already provide. Giving RET its own opcode would mean building a second instruction that does exactly what JMP already does, just restricted to one specific register -- duplicated hardware for no new behavior. THE EXACT VALUES JMP'S ENCODING NEEDS TO BEHAVE AS RET ------------------------------ Using the chapter's own JMP bitfield (opcode | 000 unused | BaseR | 000000 unused): opcode = 1100 (JMP's opcode) BaseR = 111 (binary for 7 -- selects R7) Set BaseR to 111 and the resulting instruction is, bit for bit, "jump to whatever address is currently in R7" -- which is exactly what RET is supposed to do, since JSR/JSRR always save the return address into R7. There is no additional flag, mode bit, or separate opcode value involved; RET is simply the name assemblers give to this one specific, otherwise ordinary JMP instruction. WHY THIS WORKS AS AN ANSWER ------------------------------ It explains the underlying reason RET doesn't need its own opcode (JMP's general definition already covers the behavior), and states the exact opcode/BaseR values from the chapter's own bitfield diagram that make a JMP instruction behave as RET, rather than treating the two as separate instructions that happen to look similar.