Rule 110 implemented with C++11 templates and std::array
.
$ make
clang++ -std=c++11 -Wall -pedantic rule110.cpp -o rule110
$ ./rule110
█
██
███
██ █
█████
██ █
███ ██
██ █ ███
███████ █
██ ███
███ ██ █
██ █ █████
█████ ██ █
██ █ ███ ██
███ ████ █ ███
██ █ ██ █████ █
████████ ██ ███
██ ████ ██ █
███ ██ █ █████
██ █ ███ ████ █
█████ ██ ███ █ ██
██ █ █████ █ ██ ███
███ ██ ██ ████████ █
██ █ ██████ ██ ███
███████ █ ███ ██ █
██ █ ████ █ █████
███ ██ ██ ███ ██ █
██ █ ███ ███ ██ █ ███ ██
█████ ██ ███ ██████ ██ █ ███
██ █ █████ ███ ████████ █
███ ████ ███ █ ██ ███
██ █ ██ █ ██ ███ ███ ██ █
████████ ██ █████ █ ██ █ █████
██ ██████ ████████ ██ █
███ ██ █ ██ █ ███ ██
██ █ ███ ██ ███ ██ ██ █ ███
█████ ██ █ █████ █ ██████████ █
██ █ █████ ██ ███ ██ ███
███ ██ ██ ████ ██ █ ███ ██ █
██ █ ██████ ██ █ █████ ██ █ █████
███████ █ ███ ████ ██████ ██ █
██ █ ████ ███ █ ██ █ ███ ██
███ ██ ██ ███ █ ██ ███ ██ ██ █ ███
██ █ ███ ███ ██ ████████ █ ███ ███████ █
█████ ██ ███ ██████ ███ ██ █ ██ ███
$
$ objdump -d -j .rodata rule110 ◼
rule110: file format elf64-x86-64
Disassembly of section .rodata:
0000000000400bd0 <_IO_stdin_used>:
400bd0: 01 00 02 00 ....
0000000000400bd4 <_ZZ4mainE6states>:
...
400c04: 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
...
400c34: 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
...
400c64: 00 00 00 01 01 01 00 00 00 00 00 00 00 00 00 00 ................
...
400c98: 01 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
...
400cc8: 00 01 01 01 01 01 00 00 00 00 00 00 00 00 00 00 ................
...
400cf8: 00 00 01 01 00 00 00 01 00 00 00 00 00 00 00 00 ................
...
400d28: 00 00 00 01 01 01 00 00 01 01 00 00 00 00 00 00 ................
...
400d5c: 01 01 00 01 00 01 01 01 00 00 00 00 00 00 00 00 ................
...
400d8c: 00 01 01 01 01 01 01 01 00 01 00 00 00 00 00 00 ................
...
400dbc: 00 00 01 01 00 00 00 00 00 01 01 01 00 00 00 00 ................
...
400dec: 00 00 00 01 01 01 00 00 00 00 01 01 00 01 00 00 ................
...
400e20: 01 01 00 01 00 00 00 01 01 01 01 01 00 00 00 00 ................
...
400e50: 00 01 01 01 01 01 00 00 01 01 00 00 00 01 00 00 ................
...
400e80: 00 00 01 01 00 00 00 01 00 01 01 01 00 00 01 01 ................
...
400eb0: 00 00 00 01 01 01 00 00 01 01 01 01 00 01 00 01 ................
400ec0: 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
...
400ee4: 01 01 00 01 00 01 01 00 00 01 01 01 01 01 00 01 ................
...
400f14: 00 01 01 01 01 01 01 01 01 00 01 01 00 00 00 01 ................
400f24: 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
...
400f44: 00 00 01 01 00 00 00 00 00 00 01 01 01 01 00 00 ................
400f54: 01 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
...
400f74: 00 00 00 01 01 01 00 00 00 00 00 01 01 00 00 01 ................
400f84: 00 01 01 01 01 01 00 00 00 00 00 00 00 00 00 00 ................
...
400fa8: 01 01 00 01 00 00 00 00 01 01 01 00 01 01 01 01 ................
400fb8: 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
...
400fd8: 00 01 01 01 01 01 00 00 00 01 01 00 01 01 01 00 ................
400fe8: 00 01 00 00 01 01 00 00 00 00 00 00 00 00 00 00 ................
...
401008: 00 00 01 01 00 00 00 01 00 00 01 01 01 01 01 00 ................
401018: 01 00 01 01 00 01 01 01 00 00 00 00 00 00 00 00 ................
...
401038: 00 00 00 01 01 01 00 00 01 01 00 01 01 00 00 00 ................
401048: 01 01 01 01 01 01 01 01 00 01 00 00 00 00 00 00 ................
...
40106c: 01 01 00 01 00 01 01 01 01 01 01 00 00 01 01 00 ................
40107c: 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 00 ................
...
40109c: 00 01 01 01 01 01 01 01 00 00 00 00 01 00 01 01 ................
4010ac: 01 00 00 00 00 00 01 01 00 01 00 00 00 00 00 00 ................
...
4010cc: 00 00 01 01 00 00 00 00 00 01 00 00 00 01 01 01 ................
4010dc: 01 00 01 00 00 00 00 01 01 01 01 01 00 00 00 00 ................
...
4010fc: 00 00 00 01 01 01 00 00 00 00 01 01 00 00 01 01 ................
40110c: 00 00 01 01 01 00 00 00 01 01 00 00 00 01 00 00 ................
...
401130: 01 01 00 01 00 00 00 01 01 01 00 01 01 01 00 01 ................
401140: 01 00 01 00 00 01 01 01 00 00 01 01 00 00 00 00 ................
...
401160: 00 01 01 01 01 01 00 00 01 01 00 01 01 01 00 01 ................
401170: 01 01 01 01 01 00 01 01 00 01 00 01 01 01 00 00 ................
...
401190: 00 00 01 01 00 00 00 01 00 01 01 01 01 01 00 01 ................
4011a0: 01 01 00 00 00 00 01 01 01 01 01 01 01 01 00 01 ................
...
4011c0: 00 00 00 01 01 01 00 00 01 01 01 01 00 00 00 01 ................
4011d0: 01 01 00 01 00 00 00 01 01 00 00 00 00 00 00 01 ................
4011e0: 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
4011f0: 00 00 00 00 01 01 00 01 00 01 01 00 00 01 00 00 ................
401200: 01 01 00 01 01 01 00 00 01 01 01 00 00 00 00 00 ................
401210: 01 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
401220: 00 00 00 00 00 01 01 01 01 01 01 01 01 00 01 01 ................
401230: 00 01 01 01 01 01 00 01 00 01 01 00 01 00 00 00 ................
401240: 00 01 01 01 01 01 00 00 00 00 00 00 00 00 00 00 ................
401250: 00 00 00 00 00 00 01 01 00 00 00 00 00 00 01 01 ................
401260: 01 01 01 01 00 00 00 01 01 01 01 01 01 01 01 00 ................
401270: 00 00 01 01 00 00 00 01 00 00 00 00 00 00 00 00 ................
401280: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 01 ................
401290: 01 00 00 00 00 01 00 00 01 01 00 00 00 00 00 00 ................
4012a0: 01 00 00 01 01 01 00 00 01 01 00 00 00 00 00 00 ................
...
4012b8: 01 01 00 01 00 00 00 00 01 01 01 00 00 00 01 01 ................
4012c8: 00 01 01 01 00 00 00 00 00 01 01 00 01 01 00 01 ................
4012d8: 00 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
4012e8: 00 01 01 01 01 01 00 00 00 01 01 00 01 00 00 01 ................
4012f8: 01 01 01 01 00 01 00 00 00 00 01 01 01 01 01 01 ................
401308: 01 01 01 01 00 01 00 00 00 00 00 00 00 00 00 00 ................
401318: 00 00 01 01 00 00 00 01 00 00 01 01 01 01 01 00 ................
401328: 01 01 00 00 00 01 01 01 00 00 00 01 01 00 00 00 ................
401338: 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 00 ................
401348: 00 00 00 01 01 01 00 00 01 01 00 01 01 00 00 00 ................
401358: 01 01 01 01 00 00 01 01 00 01 00 00 01 01 01 00 ................
401368: 00 00 00 00 00 00 01 01 00 01 00 00 00 00 00 00 ................
401378: 00 00 00 00 01 01 00 01 00 01 01 01 01 01 01 00 ................
401388: 00 01 01 00 00 01 00 01 01 01 01 01 00 01 01 00 ................
401398: 01 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 ................
4013a8: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 ................
4013b8: 01 00 01 01 01 00 01 01 01 01 00 00 00 01 01 01 ................
4013c8: 01 01 01 00 00 00 00 00 01 01 00 00 00 01 00 00 ................
4013d8: 00 00 00 00 00 00 01 01 00 00 00 00 00 01 00 00 ................
4013e8: 00 01 01 01 01 00 01 01 01 00 00 01 00 00 01 01 ................
4013f8: 00 00 00 00 01 00 00 00 00 01 01 01 00 00 01 01 ................
401408: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 01 01 ................
401418: 00 00 01 01 00 00 01 01 01 00 01 00 01 01 00 01 ................
401428: 01 01 00 00 00 01 01 00 00 00 01 01 00 01 00 01 ................
401438: 01 01 00 00 00 00 00 00 01 01 00 01 00 00 00 01 ................
401448: 01 01 00 01 01 01 00 01 01 00 01 01 01 01 01 01 ................
401458: 01 01 00 01 00 00 01 01 01 00 00 01 01 01 01 01 ................
401468: 01 01 00 01 00 00 00 00 00 01 01 01 01 01 00 00 ................
401478: 01 01 00 01 01 01 00 01 01 01 01 01 01 00 00 00 ................
401488: 00 00 00 01 01 01 00 01 01 00 01 00 01 01 00 00 ................
401498: 00 00 00 01 01 01 e2 96 88 00 20 00 .......... .
$