The getchar() Of Today Is:
knightos! this one is cheating a little bit, because knightos's libc doesn't actually have a getchar() function. knightos is designed to run on texas instruments calculators, and the normal ideas of standard input and output don't make a whole lot of sense on a calculator.
in fact the knightos libc is very unorthodox in general - it's not posix-compliant and many things you'd expect to have available are missing. it's very interesting to look through !
since there's no getchar(), instead we're looking at the code for the read_byte() function, which is knightos's nearest equivalent to the fgetc() function that getchar() usually calls. it takes a stream id, which is akin to a file descriptor under posix, and reads the next char from the stream.
notice that it's implemented almost entirely in assembly language rather than c! this is possible when your libc is guaranteed to run on only a single platform (ti calculators!!)