What is the terminal code for the old square ASCII character used in the original Rogue game?

Here's a game that uses it as its main character:


  • Related.
    – Daniel Beck
    Dec 30, 2011 at 7:38
  • Not really, because that's a different character, apparently. The dos console doesn't recognize it when I paste it in. Edit: Actually, it worked ok in dos, just not in Notepad with the Terminal font.
    – Nick
    Dec 30, 2011 at 7:42
  • 2
    A smiley face is not a character in standard ASCII.
    – iglvzx
    Dec 30, 2011 at 7:44
  • @Nick And that's why I only linked to it, instead of voting to close your question as duplicate.
    – Daniel Beck
    Dec 30, 2011 at 8:13
  • It would be a good question to investigate why terminals display the SOH and SOT characters as smileys, and the history in that tradition.
    – iglvzx
    Dec 30, 2011 at 8:16

2 Answers 2


That chars equals to SOH (White face) & SOT (Black Face)

Binary  Oct Dec Hex Abbr    [a] [b]    Name
000 0001    001 1   01  SOH ␁   ^A     Start of Header
000 0010    002 2   02  STX ␂   ^B     Start of Text

enter image description here

The display system for the original IBM PC in text mode had a very simple memory mapping for the 80x24 text screen. You could poke values into bytes in a certain area of memory and characters would appear on the display. The characters for each byte value were determined by a video ROM which had bitmapped display characters for all 256 values of each byte. This included displayable characters for ASCII control characters (0-31).

Many contemporary printers had the same character set and could often be set into a literal-print mode where these control characters were printed rather than acted on (a carriage return would be printed as a character, it would not cause the print head to return to the left edge of the paper).

See Wikipedia

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.