kernel.c: changed colors, Makefile: updated output

This commit is contained in:
cr0sd 2020-05-28 13:49:21 -05:00
parent 8494925192
commit 084fb8a203
2 changed files with 18 additions and 4 deletions

View File

@ -4,9 +4,23 @@ LDFLAGS= -melf_i386 -nostdlib -e loader -T link.ld
OBJS=kernel.bin
all: $(OBJS)
kernel.bin: loader.o kernel.o
$(LD) $(LDFLAGS) $^ -o $@
@echo " LD kernel.bin"
@$(LD) $(LDFLAGS) $^ -o $@
install:
cp ./kernel.bin /boot/mykernel.bin
@echo " CP kernel.bin"
@cp ./kernel.bin /boot/mykernel.bin
%.o: %.c
@echo " CC $@"
@$(CC) $(CFLAGS) -c $^
%.o: %.s
@echo " AS $@"
@$(AS) $(ASFLAGS) -c $^ -o $@
clean:
$(RM) *.o kernel.bin
@echo " RM *.o kernel.bin"
@$(RM) *.o kernel.bin

View File

@ -3,7 +3,7 @@ void puts(char*s)
{
static unsigned short*vram=(unsigned short*)0xb8000;
for(int i=0;s[i];++i)
vram[i]=(vram[i]&0xff00)|s[i];
vram[i]=0x1f00|s[i];
}
void kernelmain(void*multiboot_structure,unsigned magicnumber)