Hacker News
Read post

Self-Printing Machine Code

A self-printing machine code program that writes itself to standard output when executed in a DOS environment. It can be tested in a Unix/Linux system with DOSBox or in an actual MS-DOS 6.22 system or Windows 98 system. The program uses x86 machine code and DOS services to write its own bytes. There is a discussion on the definition of a quine and the differences between machine code quines and other quines. The program can also be modified to avoid reading its own bytes and still print itself.

    #assembly
Mar 16, 2024•19m read time•From susam.net
Post cover image
Table of contents
ContentsDemoQuine ConundrumsProper QuinesA Note on DOS ServicesWriting to Video Memory DirectlyBoot Program
6 Impressions
Hacker News's image
Hacker News

Hacker News is a community-driven platform for sharing and discussing technology news, startups, and...

17.4K Followers

•

141.8K Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard