You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
478 B
26 lines
478 B
#include "kolibrios/kolibri_debug.h"
|
|
#include <stdarg.h>
|
|
|
|
void debug_board_write_byte(const char ch){
|
|
__asm__ __volatile__(
|
|
"int $0x40"
|
|
:
|
|
:"a"(63), "b"(1), "c"(ch));
|
|
}
|
|
|
|
void debug_board_write_str(const char* str){
|
|
while(*str)
|
|
debug_board_write_byte(*str++);
|
|
}
|
|
|
|
void debug_board_printf(const char *format,...)
|
|
{
|
|
va_list ap;
|
|
char log_board[300];
|
|
|
|
va_start (ap, format);
|
|
vsprintf(log_board, format, ap);
|
|
va_end(ap);
|
|
debug_board_write_str(log_board);
|
|
}
|