Fix remaining CPU bugs; tests pass now (except timing and illegal opcodes).