← Back to context

Comment by int_19h

1 year ago

DOS was the golden age for TUI apps because its ultimate API was both simple and powerful: direct video memory access in text mode. So you just get a linear chunk of memory where each character on screen corresponds to two bytes: one for the glyph, one for foreground/background color (4 bits each). For input you had some BIOS helper interrupts, but then again it was easy enough to read scancodes directly (and they were standardized on PC).

So you can handle any key or key combo however you want, and you can put any characters anywhere you want without weird corner cases like autoscrolling.