Tag Archives: photoshop

It’s All Just Bytes

Iñigo Quilez has more code-fu than you. In the video above, he creates a an eyecandy demo using Photoshop.

It’s a simple idea. He simple creates a 9 by 9 image, and places carefully chosen pixel values to write the assembly. The “magic” is that he saves the file as raw data, and then renames it as a .com file for execution in a DOS shell. Since the file is read as a raw stream of bytes, using Photoshop in this way, isn’t any different from using a hex editor. In fact, back in The Day™ (i.e. 1992-1994) PC World would recommend using write.exe to edit different DLLs in Windows 3.1 in order to create custom menus in file manager and such. The only catch was to avoid memory alignment problems by keeping the edited string the same length as the original.