Need help with Invaders?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

472 Stars 27 Forks 22 Commits 0 Opened issues


Invaders game in 512 bytes (boot sector)

Services available


Need anything else?

Contributors list

# 222,799
15 commits
# 253,046
5 commits

| |\ | \ / /\ | \ | |] [ | | | \/ | | |/ |_ | \ ___] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Invaders game in 512 bytes (boot sector or COM file) by Oscar Toledo G. Jun/04/2019

This a game recreating the Invaders game in 512 bytes, that can be run as a COM file or put into a boot sector of a floppy disk to be run.

Move with Ctrl key to left, Alt key to right, any Shift key to shoot. (maybe you'll need to disable StickyKeys in Windows)

The previous commit worked with left arrow, right arrow and space key, but you had to press the space key to stop the spaceship. Also didn't have the barriers.

Now it's compatible with 8088 (the original IBM PC) but still it has the option for 80286 code in the source code. So you now have to look for a 8-bit compatible VGA card if you want to run it over original hardware ;)

A small video of the game running over emulation:

If you want to assemble it, you must download the Netwide Assembler (nasm) from

Use this command line:

nasm -f bin invaders.asm -Dcomfile=1 -o nasm -f bin invaders.asm -Dcomfile=0 -o invaders.img

Tested with VirtualBox for Mac OS X running Windows XP running this game, it also works with DosBox and probably with qemu:

qemu-system-x86_64 -fda invaders.img

Enjoy it!


Do you would like more details on the inner workings? This program is fully commented in my new book Programming Boot Sector Games and you'll also find a 8086/8088 crash course!

Now available from Lulu:




These are some of the example programs documented profusely in the book:

  • Guess the number.
  • Tic-Tac-Toe game.
  • Text graphics.
  • Mandelbrot set.
  • F-Bird game.
  • Invaders game.
  • Pillman game.
  • Toledo Atomchess.
  • bootBASIC language.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.