]> git.dujemihanovic.xyz Git - nameless-os.git/blob - kernel/include/tty.h
kernel: tty: Use recursion in byte/word printing
[nameless-os.git] / kernel / include / tty.h
1 #ifndef TTY_H
2 #define TTY_H
3
4 #include <stdint.h>
5
6 #define VGA_COLOR_BLACK 0x0
7 #define VGA_COLOR_BLUE 0x1
8 #define VGA_COLOR_GREEN 0x2
9 #define VGA_COLOR_TEAL 0x3
10 #define VGA_COLOR_DARK_RED 0x4
11 #define VGA_COLOR_MAGENTA 0x5
12 #define VGA_COLOR_BROWN 0x6
13 #define VGA_COLOR_LIGHT_GRAY 0x7
14 #define VGA_COLOR_DARK_GRAY 0x8
15 #define VGA_COLOR_PURPLE 0x9
16 #define VGA_COLOR_LIME 0xA
17 #define VGA_COLOR_CYAN 0xB
18 #define VGA_COLOR_BRIGHT_RED 0xC
19 #define VGA_COLOR_PINK 0xD
20 #define VGA_COLOR_YELLOW 0xE
21 #define VGA_COLOR_WHITE 0xF
22
23 extern void screen_clear(void);
24 extern void kprint(const char *string, uint8_t color);
25 extern void kprintc(const char character, uint8_t color);
26 extern void kprintb(uint8_t byte, int print_delm);
27 extern void kprintw(uint16_t word, int print_delm);
28 extern void kprintd(uint32_t dword, int print_delm);
29 extern void kprintq(uint64_t qword, int print_delm);
30 extern int kprintdec(uint32_t num, uint8_t color);
31 #endif