diff options
Diffstat (limited to '01_exercise')
-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()); } |