RAM instructions have a single operand, which can be 1. =i, meaning the integer i itself 2. i, meaning the contents of register i 3. *i, meaning indirect addressing (the contents of the register given by the contents of register i) The RAM instruction set follows. We use the following notation: c(i) = the contents of register i. The function v(a) is defined as follows: / b, if a = "=b"; v(a) = | c(b), if a = "b"; \ c(c(b)), if a = "*b". Instruction Meaning ------------- --------- 1. LOAD a c(0) := v(a) 2. STORE i c(i) := c(0) STORE *i c(c(i)) := c(0) 3. ADD a c(0) := c(0) + v(a) 4. SUB a c(0) := c(0) - v(a) 5. MULT a c(0) := c(0) * v(a) 6. DIV a c(0) := floor( c(0)/v(a) ) 7. READ i c(i) := current input symbol READ *i c(c(i)) := current input symbol 8. WRITE a v(a) is written on output tape 9. JUMP b location counter set to b 10. JUMP>=0 b if c(0) >= 0, set location counter to b; otherwise increment location counter 11. JUMP>0 b if c(0) > 0, set location counter to b; otherwise increment location counter 12. JUMP=0 b if c(0)=0, set location counter to b; otherwise increment location counter 13. HALT stop execution