A Snake game entirely written in assembler

Snake is always been for me my hello world program. I implemented it in many different languages Basic, C, C++, Java and Javascript. But I didn’t limited myself at high level languages. At the second year of university (something like 7 years ago) I actually implemented it entirely in assembler MASM in roughly 600 lines of code. It is so old that the variables and the comments are in italian 🙂

Unfortunately I can’t run it (and provide a screenshot of the game) because is using a library called compatib that I am not able to find. Friends can confirm that this code actually worked at the time 🙂

This is the main procedure:

This is the game loop:

This is the procedure that print the snake on the screen:

The entire code is available in my repository on copeplex.

This program is very old but I still remember the feeling after I implemented it in one evening and in particular the satisfaction of the following day when I showed it to my class mates. They were shocked!

This is what I call fun!

Permanent link to this article: https://www.productivecsharp.com/2012/06/a-snake-game-entirely-written-in-assembler/

Warning: in_array() expects parameter 2 to be array, null given in /home/andreaa9/public_html/wp-content/themes/graphene/inc/plugins.php on line 92
  • [A]kil[Lex] says:

    great job Angel 🙂
    I'm looking and enjoy 🙂

  • >