fix: kprintf now works with multiple arguments

This commit is contained in:
0x35c 2024-09-07 12:11:38 +02:00
parent 7d58ce2824
commit 7b9a5e0ef7
3 changed files with 9 additions and 7 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
build
obj
.*

View File

@ -1,7 +1,7 @@
AS := i386-elf-as
ASFLAGS :=
CC := i386-elf-gcc
CCFLAGS := -std=gnu99 -ffreestanding -O2 -Wall -Wextra -iquotelibbozo/headers
CCFLAGS := -std=gnu99 -ffreestanding -O2 -Wall -Wextra -iquotelibbozo/headers -g
LD := $(CC)
LDFLAGS := -T boot/linker.ld -ffreestanding -O2 -nostdlib
LIBS := ./libbozo/build/libbozo.a -lgcc

View File

@ -1,5 +1,5 @@
#include "terminal.h"
#include "kprintf.h"
#include "terminal.h"
#include <stdbool.h>
#include <stddef.h>
@ -16,10 +16,11 @@
#error "This tutorial needs to be compiled with a ix86-elf compiler"
#endif
void kernel_main(void) {
void kernel_main(void)
{
/* Initialize terminal interface */
terminal_initialize();
/* Newline support is left as an exercise. */
kprintf(0, "Hello world!");
kprintf(0, "test %d a %d b %d\n", 10, 2, 3);
}