summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>2001-10-01 11:48:02 +0000
committeryokota <yokota@FreeBSD.org>2001-10-01 11:48:02 +0000
commitd6dabd898ed511a8667a3d085a0d1973d40ca493 (patch)
tree47721358173400d25dad7ad36ede29b1bee49362 /sys/boot
parenta82b49660785e292283f0e6a9ab8a41ec8a63b43 (diff)
downloadFreeBSD-src-d6dabd898ed511a8667a3d085a0d1973d40ca493.zip
FreeBSD-src-d6dabd898ed511a8667a3d085a0d1973d40ca493.tar.gz
Fix the function CD(): "Clear to the end of the screen".
- When the video BIOS is called to clear the region (x, y)-(79, 24) (by scrolling), the slashed region in Fig.1 is cleared. CD() is supposed to clear the region shown in Fig.2. x x +-------+ +-------+ | | | | y| ////| y| ////| | ////| |///////| | ////| |///////| +-------+ +-------+ Fig.1 Fig.2 - Don't move the cursor during this operation.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/i386/libi386/vidconsole.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/boot/i386/libi386/vidconsole.c b/sys/boot/i386/libi386/vidconsole.c
index a2d74a1..bfdb5c1 100644
--- a/sys/boot/i386/libi386/vidconsole.c
+++ b/sys/boot/i386/libi386/vidconsole.c
@@ -308,15 +308,26 @@ CD(void)
{
get_pos();
+ if (curx > 0) {
+ v86.ctl = 0;
+ v86.addr = 0x10;
+ v86.eax = 0x0600;
+ v86.ebx = (bg_c << 4) + fg_c;
+ v86.ecx = (cury << 8) + curx;
+ v86.edx = (cury << 8) + 79;
+ v86int();
+ if (++cury > 24) {
+ end_term();
+ return;
+ }
+ }
v86.ctl = 0;
v86.addr = 0x10;
v86.eax = 0x0600;
v86.ebx = (bg_c << 4) + fg_c;
- v86.ecx = v86.edx;
- v86.edx = 0x184f;
+ v86.ecx = (cury << 8) + 0;
+ v86.edx = (24 << 8) + 79;
v86int();
- curx = 0;
- curs_move(curx, cury);
end_term();
}
OpenPOWER on IntegriCloud