summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Zabka <zabkaste@hu-berlin.de>2020-04-30 09:32:16 +0200
committerStefan Zabka <zabkaste@hu-berlin.de>2020-04-30 09:32:16 +0200
commit5b75cdd06f266d384491f51f0e92226b5e19ea3b (patch)
tree8bacdfea38d3024eff1cc0307ff0f723578d7ad2
parent0b4be8417c4375ecd20b2aa1d53511403477a849 (diff)
downloadbetriebssysteme-getc.tar.gz
betriebssysteme-getc.zip
Added sourcesgetc
-rw-r--r--01_exercise/bootloader.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/01_exercise/bootloader.c b/01_exercise/bootloader.c
index 403586b..1ba5786 100644
--- a/01_exercise/bootloader.c
+++ b/01_exercise/bootloader.c
@@ -5,6 +5,7 @@ asm(".code16gcc\njmp $0, $main");
char WRITE_CHARACTER_TTY = 0x0E;
+// Syscall found here http://www.ctyme.com/intr/rb-0106.htm
void put(char c) {
short command = WRITE_CHARACTER_TTY << 8 | c;
// volatile because there is no output, so the function might get optimized
@@ -23,6 +24,7 @@ void print(char const *const str) {
}
}
+// Syscall found here http://www.ctyme.com/intr/rb-1754.htm
char getc() {
char ret;
asm("mov $0x00, %%ah;"