Exercise 5.22. Exercise 3.12 of section 3.3.1 presented an append procedure that appends two lists to form a new list and an append! procedure that splices two lists together. Design a register machine to implement each of these procedures. Assume that the list-structure memory operations are available as primitive operations. ———————————————————————————————————————————————————————————————————————— Inputs in registers 'a' and 'b', output in 'val' for both. Append: (assign continue (label append-done)) loop (test (op null?) (reg a)) (branch (label null)) (save continue) (save car) (assign car (op car) (reg a)) (assign a (op cdr) (reg a)) (assign continue (label after-loop)) (goto (label loop)) after-loop (restore car) (assign val (op cons) (reg car) (reg val)) (restore continue) (goto (reg continue)) null (assign val (reg b)) (goto (reg continue)) append-done Append!: (assign val (reg a)) loop (assign a-cdr (op cdr) (reg a)) (test (op null?) (reg a-cdr)) (branch found-last-pair) (assign a (reg a-cdr)) (goto (label loop)) found-last-pair (perform (op set-cdr!) (reg a) (reg b))