From e4294e345450af1a5b7ef1da7a7138246f6fede2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Sun, 20 Oct 2024 02:20:00 +0500 Subject: [PATCH] Make it GCC compatible. --- README | 1 - boot.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README b/README index 01a4be6..691dc6b 100644 --- a/README +++ b/README @@ -1,2 +1 @@ MBR boot sector Hello world written in C. -Note: this thing does not work with GCC. diff --git a/boot.c b/boot.c index 6de7330..908ead8 100644 --- a/boot.c +++ b/boot.c @@ -1,5 +1,5 @@ -inline void putchar(char); -inline void write(char*); +static void putchar(char); +static void write(char*); void _start(void) { write("Hello World!\r\n\0"); @@ -7,12 +7,12 @@ void _start(void) { ; } -inline void write(char *out) { +static void write(char *out) { for (char *i = out; *i != 0; i++) putchar(*i); } -inline void putchar(char out) { +static void putchar(char out) { __asm__ volatile ( "movb $0x0e, %%ah;" "movb %0, %%al;"