kolibrios/programs/develop/ktcc/trunk/libc.obj/samples/consoleio.c
Coldy 1ed1f3a5b1 libc.obj:
- headers update (now used true functions with attributes instead of pointers)
 - fixed some samples
kos_mbedtls:
microtar:
changes for compatible to latest version tcc and the libc.obj headers

git-svn-id: svn://kolibrios.org@9812 a494cfbc-eb01-0410-851d-a64ba20cac60
2022-05-10 18:58:40 +00:00

21 lines
506 B
C

// demonstration conio use, color text
// more info in conio.h
#include <conio.h>
int main()
{
if (con_init())
return 1; // init fail
(*con_set_title)("Console colors");
// con_write_asciiz("\033[0;31;42m test \n"); // red on green bk
for (int i = 30; i < 48; i++) {
(*con_printf)("\033[%dmColor 0x%02X: ", i, i);
(*con_write_asciiz)("Text sample.");
(*con_printf)(" printf %s test %d\n", "small", i);
}
(*con_exit)(0);
}