mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-18 01:01:57 -04:00
Cleanup
This commit is contained in:
parent
030fb53985
commit
80cfeccdc0
4
Makefile
4
Makefile
@ -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 -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
|
nasm -D DEBUG -g -w+all -f elf64 -o micro_kernel.g src/micro_kernel.asm
|
||||||
|
|
||||||
kernel.o: src/kernel.cpp
|
kernel.o: kernel/src/kernel.cpp
|
||||||
g++ -masm=intel -O2 -std=c++11 -Wall -Wextra -fno-exceptions -fno-rtti -ffreestanding -c src/kernel.cpp -o kernel.o
|
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
|
kernel.bin: kernel.o
|
||||||
g++ -std=c++11 -T linker.ld -o kernel.bin.o -ffreestanding -O2 -nostdlib kernel.o
|
g++ -std=c++11 -T linker.ld -o kernel.bin.o -ffreestanding -O2 -nostdlib kernel.o
|
||||||
|
@ -16,15 +16,12 @@ void out_byte (uint16_t _port, uint8_t _data){
|
|||||||
__asm__ __volatile__ ("out %0, %1" : : "dN" (_port), "a" (_data));
|
__asm__ __volatile__ ("out %0, %1" : : "dN" (_port), "a" (_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
void __attribute__((naked)) keyboard_handler(){
|
void keyboard_handler(){
|
||||||
in_byte(0x60);
|
in_byte(0x60);
|
||||||
|
|
||||||
k_print("key");
|
k_print("key");
|
||||||
}
|
}
|
||||||
|
|
||||||
long current_line = 0;
|
|
||||||
long current_column = 0;
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
void __attribute__ ((section ("main_section"))) kernel_main(){
|
void __attribute__ ((section ("main_section"))) kernel_main(){
|
||||||
k_print("thor> ");
|
k_print("thor> ");
|
||||||
@ -40,6 +37,9 @@ void __attribute__ ((section ("main_section"))) kernel_main(){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long current_line = 0;
|
||||||
|
long current_column = 0;
|
||||||
|
|
||||||
enum vga_color {
|
enum vga_color {
|
||||||
BLACK = 0,
|
BLACK = 0,
|
||||||
BLUE = 1,
|
BLUE = 1,
|
BIN
micro_kernel.g
BIN
micro_kernel.g
Binary file not shown.
@ -93,8 +93,10 @@ lm_start:
|
|||||||
; Install ISRs
|
; Install ISRs
|
||||||
call install_isrs
|
call install_isrs
|
||||||
|
|
||||||
|
; Remap IRQs with wrong numbers
|
||||||
call remap_irqs
|
call remap_irqs
|
||||||
|
|
||||||
|
; Install all IRQs
|
||||||
call install_irqs
|
call install_irqs
|
||||||
|
|
||||||
sti
|
sti
|
||||||
|
Loading…
x
Reference in New Issue
Block a user