- "For `jmp` and `jpz`, `i` is relative to the current instruction. `i` can be negative to jump to earlier places in the program. `i`=1 is a no-op, `i`=0 causes an infinite loop."
+ "The `jmp` and `jpz` instructions jump relative to the current instruction, overriding the normal change in `pc`. `jmp -1` would jump back to the previous instruction; `jpz a 2` would skip the next instruction if register `a` contains zero.\n",
+ "\n",
+ "Before you start execution of a program, you can set the values of some registers.\n",
+ "\n",
+ "For example, this program multiplies the values in the a and b registers, leaving the result in the c register:\n",
+ "\n",
+ "```\n",
+ "set c 0\n",
+ "cpy a d\n",
+ "jpz b 8\n",
+ "dec b\n",
+ "cpy d a\n",
+ "jpz a 4\n",
+ "inc c\n",
+ "dec a\n",
+ "jmp -3\n",
+ "jmp -7\n",
+ "set d 0\n",
+ "```\n",
+ "\n",
+ "# Part 1\n",
+ "\n",
+ "You think you've worked out how to generate the code wanted by the ransomware. The program is given in `07-program.txt`, one instruction per line. \n",
+ "\n",
+ "Starting with register `a` holding 7, and all other registers holding zero, what does register `a` contain when the program finishes?"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "It seems your guess of 7 as the starting value was wrong.\n",
+ "\n",
+ "# Part 2\n",
+ "\n",
+ "The program is still given in `07-program.txt`, one instruction per line. \n",
+ "\n",
+ "Starting with register `a` holding 937, and all other registers and memory locations holding zero, what does register `a` contain when the program finishes?"