diff options
author | Stefan Zabka <zabkaste@hu-berlin.de> | 2020-04-29 18:22:56 +0200 |
---|---|---|
committer | Stefan Zabka <zabkaste@hu-berlin.de> | 2020-04-29 18:22:56 +0200 |
commit | 0b4be8417c4375ecd20b2aa1d53511403477a849 (patch) | |
tree | fa6257168609ebab2f7b197c919702696d63727f /01_exercise/bootloader.c | |
parent | 5b4ed0301c3b2786ef6043e0c48e49eca368c692 (diff) | |
download | betriebssysteme-0b4be8417c4375ecd20b2aa1d53511403477a849.tar.gz betriebssysteme-0b4be8417c4375ecd20b2aa1d53511403477a849.zip |
Non working getc()
Diffstat (limited to '01_exercise/bootloader.c')
-rw-r--r-- | 01_exercise/bootloader.c | 9 |
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()); } |