Pixel Coding

And now for something totally code-ninja. Below is a video that shows someone coding a demo with colored pixels.




From the description:
this is an example how little it takes to write a realtime animation effect (a textured tunnel in this case). 224 bytes are enough. therefore, open photoshop, draw some pixels, save the image, rename it to as an executable, and let the x86 cpu execute it as native code. et voila, an oldschool animation!

This is best explained by Joshua Nimoy

So let's say we really are writing an interpreter language that uses colored pixels. Do we start at the top-left pixel every time? Perhaps we designate the basic colors (#FF0000, #00FF00, and so on) as the basic instructions:

#FF0000 - move memory pointer fwd/back(a) by amount(b)
#00FF00 - move code pointer (conditional jumping)
#0000FF - read/write memory to/from registers
#FFFF00 - call an address or interrupt (function call)
#FF00FF - return (returning from function call)
#00FFFF - exit process
#FFFFFF - comment delimiter
#000000 - nop


Also, related: