You is likely to be stunned to search out out that [Akshat Joshi’s] Pong recreation that matches in a 512-byte boot sector isn’t the primary of its variety. However that doesn’t imply it isn’t an accomplishment to shoehorn helpful code in that little bitty house.
As you may count on, a recreation like this makes use of meeting language. It can also’t use any libraries or working system features as a result of there aren’t any at that specific time of the pc startup sequence. When you keep in mind that the bootloader has to finish with two magic bytes (0x55 0xAA), you must get all of it carried out in 510 bytes or much less.
This model of Pong makes use of 80×25 textual content mode and writes straight into video reminiscence. Yow will discover the code in a single file on GitHub. Within the previous days, getting one thing like this working was painful since you had little alternative however reboot your pc to check it and hope it went properly. Now you’ll be able to run it in a digital machine like QEMU and even use that to debug issues in ways in which would have made a developer from the Nineties supply up their life financial savings.
We’ve seen this earlier than, however we nonetheless admire the problem. We surprise in the event you may write Pong in BootBasic?