home *** CD-ROM | disk | FTP | other *** search
- /*
- pcbscrol.c
-
- % BIOS scrolling routines
-
- 5/16/88 by Ted.
-
- OWL 1.1
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 01/10/89 ted Removed redundant disp clip.
- */
-
- #include "pcpriv.h"
-
- OSTATIC void DIGPRIV bios_scrollvt(_arg2(opbox *, opcoord));
- /* -------------------------------------------------------------------------- */
-
- void text_bScrollBoxVt(ptd, nrows)
- ptd_struct *ptd;
- opcoord nrows;
- {
- win_type win;
- opbox scrbox;
-
- win = ptd->win;
-
- opbox_copy(&scrbox, ptd->relboxp);
- opbox_trans(&scrbox, win_GetXmin(win), win_GetYmin(win));
-
- bios_scrollvt(&scrbox, nrows);
- }
- /* -------------------------------------------------------------------------- */
-
- static void DIGPRIV bios_scrollvt(scrboxp, nrows)
- opbox *scrboxp;
- opcoord nrows;
- {
- OREGS regs;
-
- if (nrows > 0) {
- regs.h.ah = VIDINT_SCRLUP;
- }
- else if (nrows < 0) {
- regs.h.ah = VIDINT_SCRLDN;
- nrows = -nrows;
- }
- else return;
-
- if (nrows >= opbox_GetHeight(scrboxp)) return; /* quit if scroll all */
-
- regs.h.al = (byte)nrows;
- regs.h.cl = (byte)scrboxp->xmin;
- regs.h.ch = (byte)scrboxp->ymin;
- regs.h.dl = (byte)scrboxp->xmax-1;
- regs.h.dh = (byte)scrboxp->ymax-1;
- regs.h.bh = 0; /* Clear attr */
- oakint86(BIOS_VIDINT, ®s);
- }
- /* -------------------------------------------------------------------------- */
-
-