summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--01_exercise/Makefile1
-rw-r--r--01_exercise/bootloader.c8
2 files changed, 4 insertions, 5 deletions
diff --git a/01_exercise/Makefile b/01_exercise/Makefile
index 4bf8198..3576c2b 100644
--- a/01_exercise/Makefile
+++ b/01_exercise/Makefile
@@ -8,6 +8,7 @@ CFLAGS = -m32 -c -Os -march=i686 -ffreestanding -Wall -Werror
LFLAGS = -m elf_i386 -static -Tlinker.ld -nostdlib --nmagic
%.o: %.c
+ clang-format -i $^
$(CC) $(CFLAGS) $^ -o $@
%.elf: %.o
diff --git a/01_exercise/bootloader.c b/01_exercise/bootloader.c
index fe2d829..faede85 100644
--- a/01_exercise/bootloader.c
+++ b/01_exercise/bootloader.c
@@ -17,14 +17,12 @@ void put(char c) {
// clang-format on
}
-char WRITE_STRING = 0x13;
-
-void print(char const * const str) {
- for(int i = 0; str[i] != '\0'; ++i ) {
+void print(char const *const str) {
+ for (int i = 0; str[i] != '\0'; ++i) {
put(str[i]);
}
}
void main(void) {
- print("Hello!");
+ print("Hello!");
}