ZX-81 Chess in 1K

keeper7k

Human RetroDatabase
Joined
9 Ιαν 2006
Μηνύματα
2.599
Αντιδράσεις
22
David Horne is not an urban myth. David Horne achieved what many would even now consider impossible. He wrote a chess game, with AI, that ran on a poorly documented, buggy machine that contained only 1k of memory.The Sinclar ZX81.

Think about that amount of memory for a moment. 1 kilobyte. 1024 bytes. Can you write down the rules of chess in less than one thousand characters? That's a tricky task in itself. Fire up you favourite compiler, and build a minimal application. I'm guessing that its more than 1k in size, and it doesn't do anything yet.

But wait a second. 1k was the capacity of the machine. How much was actually available? The answer, as you will find if you follow the link at the end of the article, is a meagre six hundred and seventy two bytes! This article takes up more space than that.

And it had AI. Not very tough AI mind you, but AI none the less. So not only could is display the board, verify the your moves according to the rules, and detect a win or a draw, but it could select moves for itself and play them.

All this and more. He not only conceived and executed the idea that a game of chess could be packed into so few bytes, but he published the source code, along with a detailed explanation of how it was done in the February 1983 issue of `Your Computer' magazine. This article is essential reading, a trip down memory lane for those of us old enough to remember those furious, exciting 8 bit days, when the limitations defined the experience of programming, and an important piece of history for those brave young hackers who take for granted the luxuries of life, like compilers, swap space, and keyboards that click.

So, David Horne, if your out there - this is for you. I, and I'm sure, my fellow programmers, bestow upon you this honour: You, sir, created The Greatest Program Ever Written.
Το άρθρο βρίσκεται εδώ.

Τα listings του προγράμματος κι επεξηγήσεις εδώ.

Enjoy ;)
 
Assembly, και κανένα bit να μην πηγαίνει χαμένο. Σκληρές εποχές για προγραμματιστές, όχι ότι τώρα είναι καλύτερα, αλλά δεν είχες και άλλη επιλογή.

Kudos sir Keeper.
 
Πραγματικά απίστευτο το τι κατάφερε να κάνει με 1k. Ακόμα πιο εντυπωσιακό και από τα κατορθώματα των προγραμματιστών του Atari VCS, που είχαν το "τεράστιο" μέγεθος των 4k που χώραγε το cartridge.
 
Πίσω
Μπλουζα