From Ben Eater.
In this video we program the microcode of the 8-bit breadboard computer so that it supports two conditional jump instructions: JC (jump carry) and JZ (jump zero). We also test out these new instructions and write several programs using them.
Code from this video: https://github.com/beneater/eeprom-programmer
Matthew’s Patreon post with clever self-modifying code: https://www.patreon.com/posts/how-to-make-16240529
Intel x86 developers guide (4800 pages! CMP instruction is on p.726): https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf#page=726