forked from Bananymous/banan-os
Kernel is now in C++ :)
This commit is contained in:
@@ -62,6 +62,9 @@ $(ARCHDIR)/crtbegin.o $(ARCHDIR)/crtend.o:
|
||||
.c.o:
|
||||
$(CC) -MD -c $< -o $@ -std=gnu11 $(CFLAGS) $(CPPFLAGS)
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) -MD -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
|
||||
|
||||
.S.o:
|
||||
$(CC) -MD -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
|
||||
|
||||
|
||||
@@ -13,4 +13,4 @@ _init:
|
||||
_fini:
|
||||
push %ebp
|
||||
movl %esp, %ebp
|
||||
/* gcc will nicely put the contents of crtbegin.o's .fini section here. */
|
||||
/* gcc will nicely put the contents of crtbegin.o's .fini section here. */
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
.section .fini
|
||||
/* gcc will nicely put the contents of crtend.o's .fini section here. */
|
||||
popl %ebp
|
||||
ret
|
||||
ret
|
||||
|
||||
@@ -29,7 +29,7 @@ void terminal_clear(void)
|
||||
terminal_putentryat(' ', terminal_color, x, y);
|
||||
}
|
||||
|
||||
void terminal_initialize(void)
|
||||
void terminal_initialize()
|
||||
{
|
||||
terminal_row = 0;
|
||||
terminal_col = 0;
|
||||
|
||||
@@ -2,7 +2,15 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void terminal_initialize(void);
|
||||
void terminal_putchar(char c);
|
||||
void terminal_write(const char* data, size_t size);
|
||||
void terminal_writestring(const char* data);
|
||||
void terminal_writestring(const char* data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C"
|
||||
void kernel_main()
|
||||
{
|
||||
terminal_initialize();
|
||||
Reference in New Issue
Block a user