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.
This commit is contained in:
Kazutaka YOKOTA 2001-10-01 11:48:02 +00:00
parent 6c8e596705
commit b827a63aa6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=84277

View File

@ -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();
}