29 for (
int i = 0; i < 80 * 25; i++) {
31 vmem[(i * 2) + 1] = 0x0F;
51 int index = (
row * 80 +
col) * 2;
53 vmem[index + 1] = 0x07;
79 int offset = (
row * 80) +
col;
80 vmem[offset * 2] =
' ';
81 vmem[(offset * 2) + 1] = 0x07;
93 char buf[11] =
"0x00000000";
94 const char *hex =
"0123456789ABCDEF";
95 for (
int i = 0; i < 8; i++) {
96 buf[9 - i] = hex[(num >> (i * 4)) & 0xF];
120 buf[i++] =
'0' + (num % 10);
161 char pchar = (char)
va_arg(args,
int);
166 const char *pstr =
va_arg(args,
const char *);
171 int num =
va_arg(args,
int);
unsigned int u32
32-Bit Unsigned Int
void KprintDec(int num)
Prints a signed integer in decimal format.
void Kprintf(const char *fmt,...)
Formatted output to the screen.
void KprintStr(const char *str)
Prints a null-terminated string to the screen.
void KputcharBackspace()
Handles backspace keypress by moving the cursor back and clearing the character.
void Kcfp()
Clears the screen by filling the video memory with spaces.
void KprintHex(u32 num)
Prints a 32-bit unsigned integer in hexadecimal format prefixed with "0x".
void Kputchar(char c)
Outputs a single character to the screen at the current cursor position.
#define va_start(ap, last_arg)
__builtin_va_list va_list