summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Zabka <zabkaste@hu-berlin.de>2020-04-29 18:22:56 +0200
committerStefan Zabka <zabkaste@hu-berlin.de>2020-04-29 18:22:56 +0200
commit0b4be8417c4375ecd20b2aa1d53511403477a849 (patch)
treefa6257168609ebab2f7b197c919702696d63727f
parent5b4ed0301c3b2786ef6043e0c48e49eca368c692 (diff)
downloadbetriebssysteme-0b4be8417c4375ecd20b2aa1d53511403477a849.tar.gz
betriebssysteme-0b4be8417c4375ecd20b2aa1d53511403477a849.zip
Non working getc()
-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());
}