The Goat Emoji Is 100% Valid Machine Code, And It Doesn’t Stop There

Did you know emojis can be executables? Well, they are if you treat them like Intel 8088 or 8086 machine code, anyway. [GloriousCow] shared this clever revelation, demonstrating that executable programs could be created entirely from emojis. To really appreciate why, it’s necessary to take a small step back.

It all started when [GloriousCow] happened to notice, entirely by chance, that ๐Ÿ (the goat emoji) was F0 9F 90 90. Anyone familiar with x86 assembly language probably recognizes 90h as nop,ย  or null operation, or “spend a cycle doing nothing”. What about F0 and 9F? Together they are lock lahf (assert the bus lock signal then copy some status flags into register AH) which, on an 8088 and 8086, essentially does nothing.

This means the goat emoji (F0 9F 90 90) is 100% technically valid machine code. It doesn’t do anything, but here’s where it gets even more interesting.

A short string of emojis is machine code that writes HELLO (lower right) by writing directly to video memory.

There are loads of emojis, and manyย of them start with F0 9F followed by two more bytes, and many of those other two-byte combinations are surely also valid machine code. Could one create a meaningful executable program consisting entirely of emojis? The answer is yes, and [GloriousCow] crafted a simple Hello World program to demonstrate.

The simple program looks like this: ๐Ÿธโ˜บ๏ธ๐Ÿฐ๐ŸŽโ™๐Ÿ—ƒ๏ธ๐Ÿงฏ๐Ÿงฏ๐Ÿงฏ๐Ÿฎ๐Ÿ’—๐Ÿฆฎ๐Ÿชโ™๐Ÿฐ๐Ÿน๐Ÿ—ƒ๏ธ๐Ÿงฏ๐Ÿงฏ๐Ÿงฏ๐Ÿงฏ๐Ÿ’—๐Ÿช—๐Ÿงฏ๐Ÿ˜—๐Ÿงฎ๐Ÿซช๐Ÿ˜—๐Ÿงฎ๐Ÿ˜—๐Ÿฎ๐Ÿ˜ช๐Ÿ˜”โญ. Save that string of emojis to a file, give it a .com extension, and run it in DOSBox with CPU type set to 8086. It’ll printย HELLO at the bottom-right of the screen by writing directly to video memory.

There are loads more details on the original blog post, including plenty of resources and tips for writing your own executables with emojis. There’s also a much more involved VGA demo program made from emojis, so give it a look.

Some of you may be aware that ASCII characters can also be used in a similar way (and more flexibly, since they are not four-byte combinations like emojis). This was used in BASIC programs as a way to cleverly embed machine code in things like REM statements, creating odd-looking code that did things in BASIC that shouldn’t have been possible.

22 thoughts on “The Goat Emoji Is 100% Valid Machine Code, And It Doesn’t Stop There”

    1. Those days never left. You just have to be much more creative to accomplish a poke than you were in C64 basic.

      If anything with LLM support we are entering a new golden age for memory manipulation.

      That said I may have had a sheltered childhood but I feel like C64 basic soldily predates any kind of negative feelings about Microsoft.

      1. I’d rather keep using my old Action Replay pros to poke at memory than trusting a LLM for an hallucinated cheatcode that don’t exist

  1. Vachement!

    It’s rather meta in a way; github ๐Ÿงฏ๐Ÿฎ๐Ÿ’—๐Ÿฆฎ๐Ÿช markdown file ๐Ÿชฑ’s, code written in “๐Ÿ•๐Ÿ’ฉ”.

    (comment system makes me sad)

  2. I guess I’ll grab a bucket of popcorn and wait for the first emoji-based malware exploit delivered by Outlook or Chrome. Any bets?

      1. Yeah. That. We’re on that slippery slope already.

        And having just finished Anathem I have to say Diamond Age was much more enjoyable to read.

  3. ‘Baby talk. Emojis are baby talk. For babies.’ More people should have this reaction when they see excessive emoji usage, and publicly shame the offenders appropriately.

    Also just because I hate this so much: Emojimaxxing. There. Hope this helps.

  4. Scifi authors, take note. Androids’ non-human dialects should include at least: dial-up-like screeching; binary, transmitted in dozens of audio and visual formats; long emoji sequences; and ASCII characters cascading down displays. (The latter two being explained as niche communication in the vein of Cockney slang.)

    1. Androids would be able to communicate visually faster than the human eye can see. If you have a 60 FPS camera, you can reliably transmit up to 30 frames per second (Nyquist rate) when the camera isn’t synchronized to the source, but that’s already faster than people can decipher. Instead of displaying a static image, a billboard for androids could cycle through maybe 15-30 messages per second. To us it would just look like a garbled mess.

      Likewise, the dialup screeching is actually the slow speed handshake that starts at some extremely low baud rate to negotiate the link speed. The actual data that is transmitted is just a constant “khzzzzz”. If the androids have already established what rate they can use, all you would hear is short bursts of “hhz… khzz.. zzh…” etc.

  5. “ASCII characters can be used the same way”.

    Software is made out of bytes. Text is made out of bytes. Everything is long strings of numbers between 0 and 255. Everything. They can be interpreted as text, fed to a CPU as machine code. Interpreted as emojis/Unicode/whatever, output as sound, output as video, used as LLM weights, compiled as source code (just a mathematical transformation, bytes->bytes). This is a universal. It’s a big playground that you can and should explore.

    The underlying insight here shouldn’t be “emojis happen to overlap x86 opcodes”. That’s a fun coincidence but it misses the big picture — all data is fundamentally the same “stuff”. The fact that code IS data is one of the most important facts underlying all of computing.

    1. Always a good time to reread “In the beginning was the command line”. While we marvel over how LLM’s can answer most of our questions (and finally ask us some nice new questions too), underneath there is always a bunch of transistors sending a bunch of bytes to other transistors.

      1. โ€œIn the beginning was the command line”

        A recurring theme is the full power of the command line compared with easier-to-learn graphical user interfaces (GUIs) which are described as broken mixed metaphors for ‘power users’.

        I embraced OS X as soon as it was available and have never looked back. So a lot of In the Beginning…was the Command Line is now obsolete. –Neal Stephenson

        Turns out he was simply waiting for the right GUI.

    2. I liken dreams to viewing any ol’ binary file through a text editor. “Here, take these random bits and interpret them with the symbology you have available.”

      1. It would be possible if some of the bytes didn’t map to control characters that do all sorts of weird things with the output. It is technically possible if you assign the control characters their own symbols and ignore what they’re supposed to do.

        1. I’ve opened random files aplenty with Notepad++. I see goofy “characters” like faces and such, and maybe some of the text gets overwritten, but I haven’t noticed the bell character causing chaos like the old days.

          Or were you talking about dreams? :-)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.