I don't know how you did that, but now I've downloaded it and I get:
ls -l invaders.com
-rwxrwxrwx 1 user group 518 Jun 7 00:00 invaders.com
The boot sector version is:
ls -l invaders.img
-rwxrwxrwx 1 user group 512 Jun 7 00:00 invaders.img
The .com file is bigger because it has "more features" -- it allows one to "exit" the game, and in the com version it doesn't have to be less or equal of 512 bytes to fit, the boot sector version has that limitation.
I also see that even the first commit had both the .com and the .img 512 bytes:
9e7101f
BIN +512 Bytes invaders.com
BIN +512 Bytes invaders.img
I was also able to configure a virtual machine to boot from invaders.img (512 bytes) as a "floppy disk image."
in what sense is this "512 bytes"?...The source code appears to be about 4k
The source .asm file is about 4k, most of which consists of comments.
The rest is assembly language code with things like:
mov ah,al
That assembly language which is 17 bytes including the preceding spaces gets assembled into machine language which is substantially lower. I'm much more familiar with 6510 assembly than I am 8086 assembly but I believe mov ah,al is one byte for the mnemonic and two bytes for the registers for a total of 3 bytes. So the actual machine code is far smaller than the assembly source code.
It's also possible that the com file is just being padded because of the way they work, statically loaded into a specific 64kb segment of ram, limiting their size to 64kb. The assembler might just be padding it to zero out the rest of the segment, even though it isn't needed.
- The downloaded COM file is almost 64k
- The source code appears to be about 4k
Is 512 bytes the memory footprint? Assembled but not linked code? Something else?