summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--01_exercise/bootloader.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/01_exercise/bootloader.c b/01_exercise/bootloader.c
index faede85..403586b 100644
--- a/01_exercise/bootloader.c
+++ b/01_exercise/bootloader.c
@@ -23,6 +23,15 @@ void print(char const *const str) {
}
}
+char getc() {
+ char ret;
+ asm("mov $0x00, %%ah;"
+ "int $0x16;"
+ : "=a"(ret));
+ return ret;
+}
+
void main(void) {
print("Hello!");
+ put(getc());
}