aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-07-04 12:27:38 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-07-04 12:27:38 -0400
commitb303687deb4b56a9c187d74ec1869326683da464 (patch)
tree2ab4805781ca2c00d4d73f34baa86613993f0239 /vgasrc
parente5839eaffcf6ebba9d81f46a385280f7829f15d5 (diff)
downloadseabios-b303687deb4b56a9c187d74ec1869326683da464.tar.gz
seabios-b303687deb4b56a9c187d74ec1869326683da464.tar.xz
seabios-b303687deb4b56a9c187d74ec1869326683da464.zip
vgabios: Don't check for special case of page==0xff on external calls
The original "lgpl vgabios" internally used page=0xff as a mechanism for specifying the current page. It also would allow int1013 calls to externally specify bh==0xff for the current page. However, there is no documentation supporting this as an externally available feature. SeaVGABIOS does not need the internal shortcut; this patch removes the code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc')
-rw-r--r--vgasrc/vgabios.c14
-rw-r--r--vgasrc/vgafb.c2
2 files changed, 5 insertions, 11 deletions
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index 8b50192..2593e03 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -109,16 +109,10 @@ set_cursor_pos(struct cursorpos cp)
struct cursorpos
get_cursor_pos(u8 page)
{
- if (page == 0xff)
- // special case - use current page
- page = GET_BDA(video_page);
- if (page > 7) {
- struct cursorpos cp = { 0, 0, 0xfe };
- return cp;
- }
+ if (page > 7)
+ return (struct cursorpos) { 0, 0, 0 };
u16 xy = GET_BDA(cursor_pos[page]);
- struct cursorpos cp = {xy, xy>>8, page};
- return cp;
+ return (struct cursorpos) { xy, xy>>8, page };
}
static void
@@ -555,7 +549,7 @@ handle_100e(struct bregs *regs)
// Ralf Brown Interrupt list is WRONG on bh(page)
// We do output only on the current page !
struct carattr ca = {regs->al, regs->bl, 0};
- struct cursorpos cp = get_cursor_pos(0xff);
+ struct cursorpos cp = get_cursor_pos(GET_BDA(video_page));
write_teletype(&cp, ca);
set_cursor_pos(cp);
}
diff --git a/vgasrc/vgafb.c b/vgasrc/vgafb.c
index 5d1ecc9..58c60ad 100644
--- a/vgasrc/vgafb.c
+++ b/vgasrc/vgafb.c
@@ -674,7 +674,7 @@ vgafb_set_swcursor(int enable)
struct vgamode_s *vmode_g = get_current_mode();
if (!vmode_g)
return;
- struct cursorpos cp = get_cursor_pos(0xff);
+ struct cursorpos cp = get_cursor_pos(GET_BDA(video_page));
if (cp.x >= GET_BDA(video_cols) || cp.y > GET_BDA(video_rows)
|| GET_BDA(cursor_type) >= 0x2000)
// Cursor not visible