diff --git a/polmon.cc b/polmon.cc index 29de476..3f85903 100644 --- a/polmon.cc +++ b/polmon.cc @@ -54,12 +54,14 @@ uint8_t getc() { void putc(uint8_t c) { asm volatile ( + "push %%bp \n\t" "movb %0, %%al \n\t" "movb $0x0e, %%ah \n\t" "movb $0, %%bh \n\t" "int $0x10 \n\t" + "pop %%bp \n\t" :: "r" (c) - : "ax", "bh", "cc", "bp" + : "ax", "bh", "cc" ); }