2016-04-11 15:38:48 +02:00
|
|
|
#ifndef KOLIBRI_DEBUG_H
|
|
|
|
#define KOLIBRI_DEBUG_H
|
|
|
|
|
2016-04-12 20:50:48 +02:00
|
|
|
/* Write a printf() like function (variable argument list) for
|
2016-04-11 15:38:48 +02:00
|
|
|
writing to debug board */
|
|
|
|
|
|
|
|
inline void debug_board_write_byte(const char ch){
|
|
|
|
__asm__ __volatile__(
|
|
|
|
"int $0x40"
|
|
|
|
:
|
|
|
|
:"a"(63), "b"(1), "c"(ch));
|
|
|
|
}
|
2016-04-12 20:50:48 +02:00
|
|
|
|
|
|
|
//added noninline because incofortabre stepping in in debugger
|
|
|
|
void __attribute__ ((noinline)) debug_board_write_str(const char* str){
|
2016-04-11 15:38:48 +02:00
|
|
|
while(*str)
|
|
|
|
debug_board_write_byte(*str++);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* KOLIBRI_DEBUG_H */
|