(Use qemu-system-i386 -fda btetris.bin if you want to try it out.)
Not really an OS, I just squeezed an implementation of Tetris into a 512-byte boot sector. I remember that a first draft had ~600 bytes and I was cutting away bytes, here replacing mov ax,0 with xor ax,ax, there reusing code as data, until I arrived at that size.
I've lost the source code, but ndisasm should help out.
I remember I encoded tetromino shapes as a 4x4 1bpp bitmaps taking up 2 bytes each, and there's a 56 41 59 41 52 01 56 01 15 48 52 41 59 in the hexdump, which in ASCII reads VAYAR^AV^A^UHRAY. I've been meaning to write a short story featuring a Vayar V. Hray as a protagonist, but never got around to it.
(Use qemu-system-i386 -fda btetris.bin if you want to try it out.)
Not really an OS, I just squeezed an implementation of Tetris into a 512-byte boot sector. I remember that a first draft had ~600 bytes and I was cutting away bytes, here replacing mov ax,0 with xor ax,ax, there reusing code as data, until I arrived at that size.
I've lost the source code, but ndisasm should help out.
I remember I encoded tetromino shapes as a 4x4 1bpp bitmaps taking up 2 bytes each, and there's a 56 41 59 41 52 01 56 01 15 48 52 41 59 in the hexdump, which in ASCII reads VAYAR^AV^A^UHRAY. I've been meaning to write a short story featuring a Vayar V. Hray as a protagonist, but never got around to it.