Article may be outdated

This article is 2 days old. Some details may have changed since publication.

Hacker News·3 min read·hard

AttoChess, a complete, playable chess program for 16-bit x86 DOS in 278 bytes

S
SeenNotHeard
AI Summary

A developer has created a fully functional chess program for 16-bit x86 DOS that fits within 278 bytes of code. The article details the technical optimizations used to strip away unnecessary buffers and leverage DOS-specific console output.

The original renders the position into a separate buffer: it walks the board, transforms each square into a printable character, stores it, appends a $ terminator, and prints the whole string with DOS function 09h ( int 21h ). That path costs a buffer pointer setup, the copy loop's store, the terminator write, and, because the buffer lives after the board, a reserved board array in the image.

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technologyculture

Get the full story

Sign up for Headlinne to unlock AI insights, political bias analysis, and your personalized news feed.

Create free account

Already have an account? Sign in