rearraged files, set up to use grub bootloader
This commit is contained in:
11
kernel/lib/print.c
Normal file
11
kernel/lib/print.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "print.h"
|
||||
#include "stream.h"
|
||||
|
||||
extern print_stream_t* kout;
|
||||
|
||||
void kprint(const char *str) {
|
||||
while (*str) {
|
||||
kout->putchar(*str);
|
||||
str++;
|
||||
}
|
||||
}
|
||||
6
kernel/lib/print.h
Normal file
6
kernel/lib/print.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef KLIBPRINT_H
|
||||
#define KLIBPRINT_H
|
||||
|
||||
void kprint(const char* str);
|
||||
|
||||
#endif
|
||||
3
kernel/lib/stream.c
Normal file
3
kernel/lib/stream.c
Normal file
@@ -0,0 +1,3 @@
|
||||
#include "stream.h"
|
||||
|
||||
print_stream_t* pout;
|
||||
9
kernel/lib/stream.h
Normal file
9
kernel/lib/stream.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef KSTREAM_H
|
||||
#define KSTREAM_H
|
||||
|
||||
typedef struct {
|
||||
void (*putchar)(char c);
|
||||
void (*trunc)();
|
||||
} print_stream_t;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user