This commit is contained in:
Baptiste Wicht 2013-10-27 15:36:15 +01:00
parent 030fb53985
commit 80cfeccdc0
5 changed files with 8 additions and 6 deletions

View File

@ -10,8 +10,8 @@ micro_kernel.bin: $(KERNEL_SRC) $(KERNEL_UTILS_SRC)
nasm -w+all -f bin -o micro_kernel.bin src/micro_kernel.asm
nasm -D DEBUG -g -w+all -f elf64 -o micro_kernel.g src/micro_kernel.asm
kernel.o: src/kernel.cpp
g++ -masm=intel -O2 -std=c++11 -Wall -Wextra -fno-exceptions -fno-rtti -ffreestanding -c src/kernel.cpp -o kernel.o
kernel.o: kernel/src/kernel.cpp
g++ -masm=intel -Ikernel/include/ -O2 -std=c++11 -Wall -Wextra -fno-exceptions -fno-rtti -ffreestanding -c kernel/src/kernel.cpp -o kernel.o
kernel.bin: kernel.o
g++ -std=c++11 -T linker.ld -o kernel.bin.o -ffreestanding -O2 -nostdlib kernel.o

View File

@ -16,15 +16,12 @@ void out_byte (uint16_t _port, uint8_t _data){
__asm__ __volatile__ ("out %0, %1" : : "dN" (_port), "a" (_data));
}
void __attribute__((naked)) keyboard_handler(){
void keyboard_handler(){
in_byte(0x60);
k_print("key");
}
long current_line = 0;
long current_column = 0;
extern "C"
void __attribute__ ((section ("main_section"))) kernel_main(){
k_print("thor> ");
@ -40,6 +37,9 @@ void __attribute__ ((section ("main_section"))) kernel_main(){
return;
}
long current_line = 0;
long current_column = 0;
enum vga_color {
BLACK = 0,
BLUE = 1,

Binary file not shown.

View File

@ -93,8 +93,10 @@ lm_start:
; Install ISRs
call install_isrs
; Remap IRQs with wrong numbers
call remap_irqs
; Install all IRQs
call install_irqs
sti