3 ms·
It's 508 bytes, much better than what a compiler can do, and yet from a quick glance at the source I can still find a few more bytes to squeeze out.
by userbinator 3y ago
It's 508 bytes, much better than what a compiler can do, and yet from a quick glance at the source I can still find a few more bytes to squeeze out.
- zoky 3y agoOh? Do tell.
- userbinator 3y agoLooks like some of the other comments here have found a few of the optimisations already, but another one is that BIOS functions don't change register values unless specifically used for output --- in HLL jargon, all registers are effectively callee-save. Thus no need to e.g. use 16-bit move immediate when an 8-bit would be sufficient due to the other half already having the right value.