home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / fpc / source / scroll.seq < prev    next >
Encoding:
Text File  |  1988-09-12  |  1.8 KB  |  47 lines

  1. \ SCROLL.SEQ    A sub screen scroll routine for F-PC    by Tom Zimmer
  2.  
  3. comment:
  4.  
  5.         Here are a couple of utility routines that you might find
  6.         useful, they allow you to specify a window area of the screen
  7.         to be scrolled up or down by one line.
  8.  
  9.         All parameters are ZERO based, that is the top left corner of the
  10.         screen is 0,0 and the lower right of the screen is 79,24.  The
  11.         attribute of the blank area scrolled in is controlled by the
  12.         variable ATTRIB with the words >ATTRIB1 ect.
  13.  
  14.         EXAMPLE:
  15.  
  16.                 0 12 79 24 SCROLL-UP
  17.  
  18.         This will scroll the lower half of the screen up one line.
  19.  
  20.  
  21. comment;
  22.  
  23. CODE SCROLL-UP  ( left upper right lower --- )  \ scroll window up one line
  24.                 pop cx
  25.                 pop dx                  \ dl = right column
  26.                 mov dh, cl              \ dh = lower row
  27.                 pop ax
  28.                 pop cx                  \ cl = left column
  29.                 mov ch, al              \ ch = upper row
  30.                 mov bh, attrib          \ filler attribute
  31.                 mov ax, # $0601         \ 06 = scroll, 01 = one line
  32.                 int $10
  33.                 next   end-code
  34.  
  35. CODE SCROLL-DN  ( left upper right lower --- )  \ scroll window down one line
  36.                 pop cx
  37.                 pop dx                  \ dl = right column
  38.                 mov dh, cl              \ dh = lower row
  39.                 pop ax
  40.                 pop cx                  \ cl = left column
  41.                 mov ch, al              \ ch = upper row
  42.                 mov bh, attrib          \ filler attribute
  43.                 mov ax, # $0701         \ 06 = scroll, 01 = one line
  44.                 int $10
  45.                 next   end-code
  46.  
  47.