From 2120df695ed6bc56427a3c2a8d02ea72a083670a Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Thu, 25 Sep 2025 11:53:47 +0200 Subject: [PATCH] polmon: bp in clobber list works not --- polmon.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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" ); }