S A M P L E CPS 1 (Ramm) Spring 1998 1 April 1998 Quiz #10 Name ___________________ Honor Code________________________ Section _____ -------------------------------------------------------------------------------- Derivation Rules -------------------------------------------------------------------------------- (1) 1 R3: 1 -> 2:=3 code(1) = code(3) COPY AX,M(3) COPY M(2),AX MEANING FOUND code(1) = code(3) COPY AX,M(3) COPY M(2),AX (2) 2:=3 R1: 2 -> W M(2) = W MEANING FOUND code(1) = code(3) COPY AX,M(3) COPY W,AX (3) W:=3 R15: 3 -> (4 - 5) M(3) = CN1 code(3) = code(4) code(5) COPY AX, M(4) SUB AX, M(5) COPY M(3),AX MEANING FOUND code(1) = code(4) code(5) COPY AX, M(4) SUB AX, M(5) COPY CN1,AX COPY AX,CN1 COPY W,AX (4) W:=(4 - 5) R2: 4 -> 6 M(4) = M(6) code(4) = //nothing// MEANING FOUND code(1) = //nothing// code(5) COPY AX, M(6) SUB AX, M(5) COPY CN1,AX COPY AX,CN1 COPY W,AX (5) W:=(6 - 5) R1: 6 -> K M(6) = K MEANING FOUND code(1) = code(5) COPY AX, K SUB AX, M(5) COPY CN1,AX COPY AX,CN1 COPY W,AX (6) W:=(K - 5) R2: 5 -> 7 M(5) = M(7) code(5) = //nothing// MEANING FOUND code(1) = //nothing// COPY AX, K SUB AX, M(7) COPY CN1,AX COPY AX,CN1 COPY W,AX (7) W:=(K - 7) R1: 7 -> F M(7) = F MEANING FOUND code(1) = COPY AX, K SUB AX, F COPY CN1,AX COPY AX,CN1 COPY W,AX (8) W:=(K - F) -------------------------------------------------------------------------------- The code above will have sections blanked out which you have to re-create from your understanding of the process.