OSScreenPutPixelEx will draw a pixel of a certain color to the specified coordinates. This just writes the input u32 to the target location in the framebuffer, nothing is done with the data already stored in the framebuffer.
OSAllocFromSystem allocates a physically contiguous area of memory, and
returns a pointer to it as a virtual address in the calling process's
address space. OSFreeToSystem is the corresponding free function.
This brought the file size of os_functions.o (compiled at -O2, not stripped)
from 15K to 9.7K. Section sizes changed in the following ways:
.text .rela.text .data .rodata.str1.4 .syntab .strtab .shstrtab
before 5660 2928 276 3111 1264 1255 89
after 2860 2376 276 1175 1296 1294 89
The most obvious win is due to not including two strings per imported function
("OSFoo" and "Function OSFoo is NULL") in the .rodata section anymore, but
outlining the error-handling code also reduced the size of .text significantly.