From 945c3ef306e89e08798e99fe800406bf89d16ab8 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 12 Sep 2006 20:50:31 -0700 Subject: [PATCH] com32/ansicon: actually mode the cursor... --- com32/lib/sys/ansicon_write.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/com32/lib/sys/ansicon_write.c b/com32/lib/sys/ansicon_write.c index 43b7c18..1fab2ac 100644 --- a/com32/lib/sys/ansicon_write.c +++ b/com32/lib/sys/ansicon_write.c @@ -99,11 +99,13 @@ int __ansicon_open(struct file_info *fp) ireg.eax.w[0] = 0x0005; __intcall(0x22, &ireg, NULL); - /* Get cursor shape */ + /* Get cursor shape and position */ ireg.eax.b[1] = 0x03; ireg.ebx.b[1] = BIOS_PAGE; __intcall(0x10, &ireg, &oreg); cursor_type = oreg.ecx.w[0]; + ti.ts->xy.x = oreg.edx.b[0]; + ti.ts->xy.y = oreg.edx.b[1]; } } @@ -183,8 +185,8 @@ static void ansicon_set_cursor(int x, int y, int visible) if (xy.x != x || xy.y != y) { ireg.eax.b[1] = 0x02; ireg.ebx.b[1] = page; - ireg.edx.b[1] = xy.y; - ireg.edx.b[0] = xy.x; + ireg.edx.b[1] = y; + ireg.edx.b[0] = x; __intcall(0x10, &ireg, NULL); } } -- 2.7.4