News for hackers. Stuff that matters.
Re:SectorC: A C Compiler in 512 bytes by xorvoid on Thursday May 25, 2023 @12:26AM (#36067061)
It’s written in x86-16 real mode because all immediates are smaller and switching to 32-bit mode takes a fair amount of code.

I would have preferred 32-bit mode because real mode is awkward with its seg:off addressing scheme.

Using the bios functions just allows it to have “not-boring” examples easily.

Re:SectorC: A C Compiler in 512 bytes by mjevans on Thursday May 25, 2023 @01:35AM (#36067350)
That's true, but it's still a sort of library dependency. Even for very tiny computers with a lot of hardware assistance, the basic ROM for communicating with the world in a useful way is bigger.