The goat emoji turns out to be valid 8086 machine code

Started by Idle Current, Today at 10:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Topic: The goat emoji turns out to be valid 8086 machine code   Views(Read 34 times)
Active members in this topic:
Idle Current(1)

Idle Current

Programmers have found a playful way to write code entirely in emoji. Hackaday reports that a coder known as GloriousCow noticed by chance that the goat emoji, when stored as bytes, is valid code for Intel's old 8086 and 8088 processors

The goat's bytes include two instructions that do nothing on those chips. The other bytes form an instruction pair that, on those processors, also effectively does nothing, so the goat is a harmless line of code

GloriousCow then wrote a Hello World program made entirely from emoji. Saved as a .com file and run in DOSBox in 8086 mode, it prints HELLO by writing directly to video memory

The original blog post also includes a more complex graphics demo built from emoji. It shows how far the joke can be pushed

It is a wonderfully silly discovery that shows how text and code are both just numbers underneath. Projects like this are pure fun, but they also teach people how computers work at the lowest level. Somewhere, a goat is quietly running on an old IBM PC

What is the most absurd programming trick you have seen? And have you ever written code for old PCs?

Making the internet slightly better one post at a time