Back to browse
GitHub Repository

Battery info program for x86-64 Linux laptops in 307 bytes of machine code

100 starsAssembly

A (marginally) useful x86-64 ELF executable in 298 bytes

by meribold·Apr 7, 2026·13 points·0 comments

AI Analysis

●●●●GemWizardryZero to OneNiche Gem

298 bytes total — direct syscalls, no libc, hand-written assembly that actually works.

Strengths
  • Direct syscall interface means zero dependencies — pure machine code that runs anywhere x86-64 Linux exists.
  • Constraint-forced ingenuity: every byte matters, forcing genuinely clever optimization techniques.
  • Actually useful output despite size — shows battery percentage and status, not just a demo.
Weaknesses
  • Linux x86-64 only — no ARM, no macOS, no Windows support possible with this approach.
  • Niche utility: most users will never need a sub-300-byte battery tool in production.
Target Audience

Low-level programmers, demoscene enthusiasts, Linux tinkerers

Similar To

Sameshi (2KB chess engine) · sizecoding demos · tiny ELF executables

Similar Projects