home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / PCBSCROL.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  1.4 KB  |  65 lines

  1. /*
  2.     pcbscrol.c
  3.  
  4.     % BIOS scrolling routines
  5.  
  6.     5/16/88  by Ted.
  7.  
  8.     OWL 1.1
  9.     Copyright (c) 1988, by Oakland Group, Inc.
  10.     ALL RIGHTS RESERVED.
  11.  
  12.     Revision History:
  13.     -----------------
  14.     01/10/89 ted    Removed redundant disp clip.
  15. */
  16.  
  17. #include "pcpriv.h"
  18.  
  19. OSTATIC void DIGPRIV bios_scrollvt(_arg2(opbox *, opcoord));
  20. /* -------------------------------------------------------------------------- */
  21.  
  22. void text_bScrollBoxVt(ptd, nrows)
  23.     ptd_struct *ptd;
  24.     opcoord nrows;
  25. {
  26.     win_type win;
  27.     opbox scrbox;
  28.  
  29.     win = ptd->win;
  30.  
  31.     opbox_copy(&scrbox, ptd->relboxp);
  32.     opbox_trans(&scrbox, win_GetXmin(win), win_GetYmin(win));
  33.  
  34.     bios_scrollvt(&scrbox, nrows);
  35. }
  36. /* -------------------------------------------------------------------------- */
  37.  
  38. static void DIGPRIV bios_scrollvt(scrboxp, nrows)
  39.     opbox *scrboxp;
  40.     opcoord nrows;
  41. {
  42.     OREGS regs;
  43.  
  44.     if (nrows > 0) {
  45.         regs.h.ah = VIDINT_SCRLUP;
  46.     }
  47.     else if (nrows < 0) {
  48.         regs.h.ah = VIDINT_SCRLDN;
  49.         nrows = -nrows;
  50.     }
  51.     else return;
  52.  
  53.     if (nrows >= opbox_GetHeight(scrboxp)) return;    /* quit if scroll all */
  54.  
  55.     regs.h.al = (byte)nrows;
  56.     regs.h.cl = (byte)scrboxp->xmin;
  57.     regs.h.ch = (byte)scrboxp->ymin;
  58.     regs.h.dl = (byte)scrboxp->xmax-1;
  59.     regs.h.dh = (byte)scrboxp->ymax-1;
  60.     regs.h.bh =  0;        /* Clear attr */
  61.     oakint86(BIOS_VIDINT, ®s);
  62. }
  63. /* -------------------------------------------------------------------------- */
  64.  
  65.