> Pretty Good Computer
Pretty Good Computer
- Zeros a memory location n
- Increments a memory location n
- Compares memory locations n and m for equality. If n and m are equal, proceeds to the next line, otherwise goes to line l
What is this?
Pretty Good Computer is an implementation of John Graham-Cumming's description of a Z machine. This particular implementation differs because it only has 16 memory registers (because I didn't want to make an infinitely long table - suggestions welcome on improving the memory register ui).
This program initializes memory locations 0 and 1, then sets memory location 0 to 2. It then sets memory location 1 equal to the value of memory location 0.
Try changing the value of memory location 0
- Implement a program that multiplies the values in registers 0 and 1 and stores the result in register 2.
- Implement a program that divides the value of register 0 by the value of register 1 and stores the result and remainder in registers 2 and 3.
- Implement Rule 110 and prove this is (or is not) a Turing complete language