All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

SectorC: A 512-Byte C Compiler Written in x86-16 Assembly

By

valyala

3mo ago· 11 min readenNews

Summary

SectorC is an extremely compact C compiler written in x86-16 assembly that fits within a 512-byte boot sector of an x86 machine. It supports a subset of C sufficient for writing real programs and is likely the smallest C compiler ever created. The article provides technical details including a base64 encoding of the compiler.

Key quotes

· 4 pulled
SectorC (github) is a C compiler written in x86-16 assembly that fits within the 512 byte boot sector of an x86 machine.
It supports a subset of C that is large enough to write real and interesting programs.
It is quite likely the smallest C compiler ever written.
In a base64 encoding, it looks like this: [followed by the encoding]
Snippet from the RSS feed
SectorC (github) is a C compiler written in x86-16 assembly that fits within the 512 byte boot sector of an x86 machine. It supports a subset of C that is large enough to write real and interesting programs. It is quite likely the smallest C compiler ever

You might also wanna read