Diode ROM with decoder and multiplexers
I've seen people do this before, it's really strange and was far more common back in the 80s (or earlier) when memory was really, really expensive and programs were short.

The general concept is you run your address lines to a demultiplexer (or inverting demultiplexer, as in this case) and have a pull-up resistor from every data line to 5V. You then place a diode in every spot you want to be a 0 (depending on address, like a memory) when you want that bit in your program to be a '0' at a certain address from the non-fixed side of the pull-up resistor to that output of the demultiplexer.

When the demultiplexer output is low, current will run through the pull-up resistor and diode and since the diode forward voltage drop is 0.7V it will be under the 0.8V required for a logic '0' but when the demulitplexer output is high no current runs through that leg of the circuit and it is high.

It's an incredibly difficult concept to describe in a text box, see this article: http://www.wintergroundfairlands.com/2013/10/visualizing-roms-1-diode-matrix-rom.html