mirror of
https://github.com/tailix/kernel.git
synced 2024-10-30 12:03:52 -04:00
C preprocessor with NASM sources
This commit is contained in:
parent
47c6eca209
commit
465febe9a6
2 changed files with 11 additions and 3 deletions
|
@ -3,7 +3,7 @@ CCPREFIX = i686-elf-
|
||||||
AS = $(CCPREFIX)as
|
AS = $(CCPREFIX)as
|
||||||
CC = $(CCPREFIX)gcc
|
CC = $(CCPREFIX)gcc
|
||||||
|
|
||||||
OBJS = boot.s.o main.c.o logger.c.o console.c.o gdt.c.o idt.c.o isr.c.o isr.asm.o multiboot.c.o protected.asm.o
|
OBJS = boot.s.o main.c.o logger.c.o console.c.o gdt.c.o idt.c.o isr.c.o isr.asm.o multiboot.c.o protected.asm.cpp.o
|
||||||
|
|
||||||
all: kernel
|
all: kernel
|
||||||
|
|
||||||
|
@ -22,3 +22,9 @@ kernel: $(OBJS)
|
||||||
|
|
||||||
%.asm.o: %.asm
|
%.asm.o: %.asm
|
||||||
nasm -felf -o $@ $<
|
nasm -felf -o $@ $<
|
||||||
|
|
||||||
|
%.asm.cpp.o: %.asm.cpp
|
||||||
|
nasm -felf -o $@ $<
|
||||||
|
|
||||||
|
%.asm.cpp: %.asm
|
||||||
|
cpp -P $< $@
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
[GLOBAL gdt_flush]
|
[GLOBAL gdt_flush]
|
||||||
[GLOBAL idt_flush]
|
[GLOBAL idt_flush]
|
||||||
|
|
||||||
|
@ -5,13 +7,13 @@ gdt_flush:
|
||||||
mov eax, [esp+4]
|
mov eax, [esp+4]
|
||||||
lgdt [eax]
|
lgdt [eax]
|
||||||
|
|
||||||
mov ax, 0x10
|
mov ax, GDT_KERNEL_DS_SELECTOR
|
||||||
mov ds, ax
|
mov ds, ax
|
||||||
mov es, ax
|
mov es, ax
|
||||||
mov fs, ax
|
mov fs, ax
|
||||||
mov gs, ax
|
mov gs, ax
|
||||||
mov ss, ax
|
mov ss, ax
|
||||||
jmp 0x08:.flush
|
jmp GDT_KERNEL_CS_SELECTOR:.flush
|
||||||
.flush:
|
.flush:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue