Programs that prints its own source code without reading any files.
Find a file
2026-06-27 15:11:32 +02:00
src chore: update Grace bufflen 2026-06-09 14:15:03 +02:00
.gitignore Initial commit 2026-05-26 13:11:50 +02:00
gen_src.py fix: Colleen_asm 2026-06-01 00:39:28 +02:00
Makefile fix: fclean 2026-06-09 14:13:46 +02:00
README.md feat: README 2026-06-27 15:11:32 +02:00

Dr_Quine

A quine is a program that prints its own source code without reading any file. This project implements quines in 3 languages: C, x86-64 Assembly, and Shell.

The replication logic relies on a string that contains the source code of the program itself. When a special placeholder character ($) is encountered while printing that string, the program switches into escape mode and prints the string again — this time with special characters escaped — so the output is valid source code. Every other character is printed as-is. The result is a perfect copy of the original source.

Programs

  • Colleen — simple quine, prints its source to stdout
  • Grace — writes its source into a new file Grace_Kid.c
  • Sully — generates and compiles a child program, then runs it, counting down from 5 to 0

Warning: The assembly code in this project does not follow the System V AMD64 ABI — calling conventions, callee-saved/caller-saved registers, and stack alignment are not properly respected. This was my first program in assembly.