# ``move 0,1'' instruction: moves contents of location 0 to location 1 # memory location 2 is ``scratch'' memory, input is x, in location 0 subz 1,1,next # mem[1] = mem[1]-mem[1] = 0 subz 2,2,next # mem[2] = mem[2]-mem[2] = 0 subz 2,0,next # mem[2] = mem[2]-mem[0] = -x subz 1,2,next # mem[1] = mem[1]-mem[2] = x
bsy@cse.ucsd.edu, last updated