KnightOS supports the TI-84+ Color Silver Edition. This calculator uses a ILI9335 display, which has a resolution of 320x240. KnightOS uses 16-bit colors, in the format 0bRRRRRGGGGGGBBBBB. Due to the size of the screen, and the speed requirements for driving it, KnightOS programs do not use an in-memory buffer. An uncompressed image the full size of the screen takes up more than all addressable memory on the device. Instead, we've provided functions for drawing directly to the LCD. Generally speaking, the color you wish to draw with is provided in the IY register (which is used for the monochrome buffer in non-color applications). The kernel supports both monochrome and color display modes on the same calculator, and even running at the same time. We refer to monochrome mode as "legacy mode", and color mode as "color mode". Your program should tell the kernel which mode you'd like to use, and the kernel will handle the switching semantics to help you coorperate with the rest of the enviornment.
Draws a clipped rectangle of the specified size with the specified color in color mode.
color of the rectangle in R5G6B5 format
height of the rectangle in pixels
Y coordinate in pixels
width of the rectangle in pixels
X coordinate in pixels
The rectangle will be clipped to any LCD window already in place, and restore it afterwards.