home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / QB4WIN32.ZIP / W32.DOC < prev    next >
Text File  |  1980-01-02  |  28KB  |  589 lines

  1.  
  2.         Documentation for QBasic Windows Version 3.2
  3.  
  4. The routines and notes listed here appear in this file in
  5. alphabetical order.
  6.  
  7.                         I.  Window Routines
  8.  
  9.         OpenW                   FillW                   Border
  10.         SaveW                   InitW                   DefBorder
  11.         CloseW                  SaveWgra                WSize
  12.         CloseLastW              CloseWgra               WSizeGra
  13.  
  14.                         II. Print routines
  15.  
  16.         Printt                  PrintW                  Lokate
  17.         Prnt                    PrntW                   Kolor
  18.         PrntS                   PrntUsingS              Tabb
  19.         KLS
  20.  
  21.                        III. Misc routines
  22.  
  23.         ScrollU                 ReadScreen              DebugW
  24.         ScrollD                 Int3                    Dump1
  25.         ScrollL                 Int10                   Refresh
  26.         ScrollR                 Adapter                 Monochrome
  27.         MapMask                 SetViewPage             SnowCheckingOn
  28.         InitW                   SetViewW                SnowCheckingOff
  29.         ConvertTG
  30.  
  31.  
  32.                        IV. Notes
  33.  
  34.         Additional documentation         Description of this library
  35.         Quirks and misc notes            W32.DEC
  36.         If you have problems...          Registration
  37.         Files included with this library
  38. ===========================================================================
  39. Adapter (a%)
  40.         Pass an integer variable to this call to find what kind of video
  41. adapter is active. Adapter has not been tested on an EGA. An active VGA
  42. will return a value of 3 even if it is emulating a CGA or EGA, since it is
  43. the VGA that is active.
  44.         Return codes:
  45.                 0 - MDA (monochrome)
  46.                 1 - CGA
  47.                 2 - EGA
  48.                 3 - VGA
  49. ===========================================================================
  50. Additional documentation
  51.         There are some routines for the VGA color registers written
  52.         in QBasic included in W32.BAS.  Documentation for them is at
  53.         the beginning of W32.BAS
  54.  
  55.         W32Lib.bat contains a list of the calls in each object file
  56.         and commands to create .QLB and .LIB files.
  57.  
  58. ===========================================================================
  59. Border n
  60.           The values  for border are:
  61.                0       no border
  62.                1       single line
  63.                2       double line
  64.                3       double line at top and bottom, single line on sides
  65.                4       User defined (by Call DefBorder)
  66. ===========================================================================
  67. CloseLastW ()
  68. Closes the most recently opened window (created with OpenW or SaveW).
  69. The coordinates and segment of the last ten windows are saved on a
  70. revolving stack so it may be called up to ten times.  CloseW will bump
  71. the last one off the stack. OpenW and SaveW add one to the stack (even
  72. if the segment is 0). Call DebugW to view the stack.
  73. Example:
  74.        redim b(1000):
  75.        CALL SaveW(VARSEG(b(1)), 1, 1, 24, 80)
  76.        call OpenW(0,1,40,10,60)
  77.        call CloseLastW
  78.        call CloseLastW
  79. ===========================================================================
  80. CloseW (segment,TR,LC,BR,RC)
  81. Closes a window opened by either SaveW or OpenW.  The window may be
  82. moved or copied to a new location on the screen by changing the
  83. coordinates.
  84. ===========================================================================
  85. DebugW ()
  86.         Prints information about the current values for QB4Windows
  87.         parameters.  In graphics modes, the window coordinates given
  88.         will be graphics even if they were given as text coordinates via
  89.         OpenW or SaveW.
  90. ===========================================================================
  91. DefBorder(x$)
  92.         Allows the user to define a new border.  X$ is a string of
  93.         nine characters for the
  94.             top left corner    -   top row   -  top right corner
  95.             left side          -   middle    -  right side
  96.             bottom left corner - bottom line - bottom right corner
  97.  
  98.  
  99.        DefBorder may also be used to fill an area of the screen with a
  100.        character. For example, to fill the entire screen with periods:
  101.                Call DefBorder (".........")
  102.                call OpenW(4,attribute,0,1,1,25,80)
  103.         An example of this appears in W32.BAS in the sub Windows2.
  104.  
  105. ===========================================================================
  106. Description of this library
  107.  
  108.         Qb4Win32 is a screen oriented library written entirely in assembler
  109. for QuickBasic and assembler programmers.  It is probably the easiest
  110. subh library to use, and has the best routines for saving, clearing,
  111. drawing and restoring windows.  A problem that kept earlier versions from
  112. working with the Phoenix bios has been corrected.
  113.  
  114.         Qb4Win33 can save and draw windows in all of the text and
  115. graphics modes, including the VGA extended modes. In addition, it can
  116. scroll up, down, left and right in all of the text and graphics modes.
  117. Other routines provide the programmer opportunity to print strings
  118. and numbers in the 132-column text modes;  confine printing to a window;
  119. determine the adapter in use;  print to two monitors; a powerful routine
  120. called FillW to print string arrays;  set the text mode to any
  121. of the VGA extended modes up to 100 lines by 132 columns;  set the color
  122. registers; scroll only selected color planes; and read text from the screen
  123. into strings.
  124.  
  125.         The library is divided into a few object files so that you may
  126. exclude those you do not want to save memory.  The entire library
  127. uses about 15K.  A simple batch file is included to facilitate linking
  128. the object files with those from your own or other's libraries.  The demo
  129. program contains useful basic routines and makes the use of and capabilities
  130. of this library easy to understand.
  131.  
  132. ===========================================================================
  133. Dump1 (segment, offset,  attr, NLines,  Row)
  134.  
  135.         Does a debug-style memory dump.  W32.BAS demonstrates this routine
  136. by using a sort of multi-tasking to do an X-RAY type dump of the keyboard
  137. buffer.
  138.  
  139.         Seg     Segment to display
  140.         Offset  Offset to display
  141.         attr    defines the color
  142.         NLines  # of lines to dump
  143.         Row     Start printing at this row
  144.  
  145.         The Offset is not an integer variable as it was in W31.
  146.         You may display the memory dump on a second monitor
  147. by switching between the cga & vga video segments:
  148.         Call Monochrome : Call Dump1 [or Refresh] : InitW
  149. ===========================================================================
  150. Files included with this library
  151.  
  152. W32      DOC    27192           This file
  153.  
  154. W32DEMO  BAT       63           Batch file to run the demo
  155. W32      BAS    52407           Demo program.  W32.DEC W32.VPT & W32.DOC
  156.                                     should be in the current directory
  157.  
  158. W32LIB   BAT     1416           Use to create W32.LIB or change W32.QLB
  159. W32      QLB    15341           QBasic library
  160. W32      DEC     2510           Declare statements
  161. W32      VPT       49           file used by W32.BAS
  162.  
  163. W32      OBJ     3653           object files used by W32LIB.BAT
  164. PRNTS    OBJ     2145
  165. MISC     OBJ     2952
  166. SCROLL   OBJ     2492
  167. SAVEW    OBJ     2629
  168. PRNT     OBJ     1874
  169.  
  170. ===========================================================================
  171. FillW ( n , varptr(a$(L) )
  172.         Fills a window with strings from an array.  The coordinates used
  173.         are those of the window most recently  opened with OpenW or
  174.         SaveW.  The first n characters of each string are skipped, so
  175.         increasing n has the effect of scrolling to the left. Increasing
  176.         L has the effect of scrolling up.
  177.         Example:
  178.               call OpenW(2,7,0,2,20,10,40)
  179.                redim a$(500) : 'and assign strings to a$()
  180.                n=0 : L=1
  181.                FillW n , varptr(a$(L)
  182.        L should not be greater than the last string dimensioned less the
  183.        number of lines to print in the window plus 1, otherwise the
  184.        remainder of the window will be printed with garbage.
  185.  
  186.         The sub FILL in WDemo.bas demonstrates using FillW to view a file and
  187.         the main menu uses it to fill a menu box.
  188.  
  189.         This will not work with an array of fixed length strings.
  190. ===========================================================================
  191. If you have problems
  192.        If your computer locks up or loses data, check the following:
  193.        Used SaveW or OpenW with an array that was too small.
  194.        Used a static array - put REM $DYNAMIC in each SUB
  195.        Passed the wrong segment to OpenW or SaveW. Example:
  196.                 REDIM a%(800): OpenW VARSEG (a(1)), ......
  197.        Did not include W32.DEC - you must have the DECLARE statements.
  198.  
  199.         If you can't get this program to behave properly, before writing
  200.         run the demo (W32.BAS) to see what does and does not work in it.
  201.         Since most of this program is new and it got a little complicated,
  202.         some bugs are probably inevitable, so don't hesitate too long
  203.         before asking for help. You may also want to check for a more
  204.         recent version on one of these bulletin boards (the next version
  205.         will be QB4Win33.Zip):
  206.  
  207.         Exec-PC                         (414) - 964 - 5160
  208.  
  209.         The Utilities Exchange          (614) - 442 - 6695
  210.  
  211.         Greater Cincinnatti PC users    (513) - 221 - 7284
  212.  
  213.         Public Domain SIG               (619) - 749 - 2741
  214.  
  215.         Odie link                       (614) - 335 - 3972.
  216.  
  217.        Remember, it is up to YOU to protect valuable data and programs.
  218.  
  219. ===========================================================================
  220. InitW  (RR%, CC%)
  221.         Resets all the parameters for windows to their default values.
  222.         This should be called at the beginning of a program.  If the
  223.         program is halted and run again, the defaults may be incorrect.
  224.         This call passes the integer variables RR and CC so that Lokate,
  225.         Prnt and PrntW can find them. The call to InitW is included in W32.DEC.
  226. ===========================================================================
  227. int3 ()
  228.         calls interrupt 3
  229. ===========================================================================
  230. Int10   (ax%, bx%, cx%, dx%)
  231.         Copies DS into ES, calls interrupt 10h, passes the values of 4
  232. registers back to QBasic.
  233. ===========================================================================
  234. KLS
  235.         Clears the screen, sets the cursor coordinates (RR and CC) to 1.
  236. ===========================================================================
  237. Kolor  foreground, background
  238.         Sets the color for W32, like Basic's COLOR.
  239. ===========================================================================
  240. Lokate line, column
  241.         Sets the cursor location (used by PrntW, Prnt, PrntS, etc)
  242. by setting the values of RR and CC.  RR and CC are defined as
  243. common shared integers in W32.dec.  It also moves the cursor
  244. to the new location.
  245.         Use basic's LOCATE to change the shape of the cursor.  You may also
  246. have to move the cursor or CLS to make it take effect.
  247. ===========================================================================
  248. Monochrome
  249.         This forces W32 to use the monochrome adapter. If the
  250. active monitor is a CGA-VGA, the cursor movement will appear on the
  251. active monitor even though the text is written to the MDA. With this
  252. function you may have a VGA in a graphics mode and
  253. still print text on a MDA. Call InitW to restore the defaults.
  254. ===========================================================================
  255. OpenW (segment, TR, LC, BR, RC)
  256.         This calls SaveW to save the window. In addition, the area in the
  257.         window is blanked and a border drawn around it.  Use Border
  258.         and Kolor to define the border and colors used.  See also SaveW.
  259.  
  260. If the segment passed is 0 the data is not saved and you do not have
  261.        to dimension an array.  This is used to draw a box, set up
  262.        coordinates for FillW and erase the window. Example:
  263.        call OpenW(2,7,0,2,20,10,40)
  264.  
  265.        The sub Machine in W32.bas demonstrates using  OpenW to draw
  266.        a black rectangle. The sub Windows2 shows how to draw 2 overlapping
  267.        windows to create a shadow effect.
  268.  
  269. In SCREEN 2, OpenW will not print graphics characters.  To draw a border
  270. in this mode, use Border (4) and define a border with DefBorder using only
  271. CHR$(1) to CHR$(127)
  272.  
  273.         Note that in graphics modes, TR LC BR & RC are still TEXT coordinates.
  274.         For example, in SCREEN 12, TR and BR are 1 to 30, not 0 to 479.
  275.  
  276. ===========================================================================
  277. Printt "string", attribute, row,column
  278. PrintW "string", attribute, row,column
  279. Prnt   "string"
  280. PrntW  "string"
  281.  
  282.         The attribute for Prnt and PrntW is passed via a call to KOLOR.
  283.         The locataion is passed with a call to LOKATE.  Printt and Prnt
  284.         will print at any location on the screen, unless the display has
  285.         been restricted by calling SetViewW.  PrintW and PrntW will only
  286.         print within a window.
  287.  
  288.         The string may be a variable or literal, as:
  289.         Prnt "Hello"
  290.         msg$ = "Hello" : Prnt msg$
  291.  
  292.         The attribute, row and column may be any type of number:
  293.         Printt "Hello", &h30, Row + 3, 15
  294.  
  295.         After the call, the cursor is positioned after the last character
  296.         printed, and the values of RR and CC are updated to reflect the new
  297.         cursor position so another string may be printed without making another
  298.         call to lokate.  Thus these calls are equivalent to basic's
  299.                         PRINT "string";
  300.         where a semicolon suppresses the line wrap.
  301.  
  302.         With PrntW  the easiest way to position the cursor at the top
  303.         left corner of the window is to Lokate 1, 1.  It will automatically
  304.         move down and right until it is inside the window.  Likewise, use
  305.         Lokate 25,81 to force the window to scroll up a line and position the
  306.         cursor at the start of the last line.
  307.  
  308. -------------------------------------------------------------------------
  309. CR$
  310.         If a string printed with Printt, PrintW, Prnt or PrntW is appended
  311.         with a chr$(13) a carriage return\linefeed is executed.  The
  312.         line will be erased to the end and the cursor drops to the beginning
  313.         of the next line, scrolling if necessary.  This is equivalent to
  314.         PRINT a$.  Example:
  315.                 CR$ = Chr$(13): Lokate 1,1
  316.                 Prnt "Hello" + cr$
  317.  'Hello' and 75 blank spaces will be printed and the cursor will be at 2, 1
  318.  
  319. -------------------------------------------------------------------------
  320. EOL$
  321.         Appending the string with chr$(10) is the same as chr$(13)
  322.         except that scrolling is suppressed.  Use this to print on the
  323.         last line of the screen and erase to the end of the line without
  324.         causing the screen to scroll.  RR will go out of bounds instead.
  325.  
  326.         Example:
  327.           Lokate 25,1 : EOL$ = chr$(10)
  328.           Prnt "Hello" + EOL$
  329.                  'prints "Hello" and 75 blank spaces
  330.                  'Now RR=26 and CC=1
  331.           Prnt "Goodby"
  332.                 'since RR is > 25, now the screen scrolls up and Goodby
  333.                 ' is printed at 25, 1
  334.  
  335. -------------------------------------------------------------------------
  336.         Prnt and Printx are much faster than Basic, and don't have
  337.         some of its quirks.  For example,
  338.                 Locate 24,79:Print "abc"; :' will scroll the top
  339.                         24 lines and print at 24,1
  340.  
  341.                 Locate 25,79:Print "abc"; :' will also scroll the
  342.                         first 24 lines and print at 24,1
  343.  
  344.                a$="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  345.                locate 1,1:Print a$;a$;
  346.                'the second a$ will print at 2,1 because it could not
  347.                'entirely fit on the first line
  348.  
  349. ===========================================================================
  350. ===========================================================================
  351. PrntS   (BYVAL x!)
  352.         Prints a single-precision number.  Use lokate & kolor to set the
  353. location and color.  It is about twice as fast as QBasic, and 7 times
  354. faster if called directly from assembler.  Maximum of 7 digits right of
  355. the decimal point, about 18 left of the decimal point, and 7 significant
  356. digits. This allows printing numbers in 132 column modes.  Positive
  357. numbers do not have a leading blank space.
  358. ===========================================================================
  359. PrntUsingS      (mask$, n)
  360.         Prints a single precison number using a mask, like PRINT USING.
  361.         Example:   x = 33.4 : PrntUsingS "####.###", x
  362.         Output:    33.400
  363. ===========================================================================
  364. Quirks and misc. notes
  365.         If you have used 'INCLUDE:'W32.DEC' and the program halts at the last
  366. line of W32.DEC, highlights "RR" and displays the message box
  367. "wrong data type", unload W32.DEC. It happens when you load W32.DEC
  368. to edit the file.
  369.                  -------------------------------------
  370.         The calls that don't have arguments can't be the first command
  371. on a line because they will be interpreted as labels instead of commands.
  372. These don't work:
  373.         KLS : Prnt "Hello"
  374.         CloseLastW : EXIT SUB
  375. These do:
  376.         Call KLS: Prnt "Hello"
  377.         KLS
  378.                   ------------------------------------
  379.         All the print routines check the boundaries set by SetViewW, and
  380. also check the current display.  Windows or Lokates outside these boundaries
  381. are resized to fit the screen.
  382.                   ------------------------------------
  383.         QBasic saves the current state of the VGA before returning to
  384. the editor, and restores it if you halt and then continue the program, so it
  385. is not possible to change the editor to 43 line mode with W32.BAS.  To use
  386. the editor in this mode, change before invoking QB.EXE.
  387.         Since QBasic 4.0 does not support 132 column modes at all, and
  388. the VGA in this mode (mode 17h) emulates 80 column mode, it is not
  389. advisable to halt a program and try to use the editor while in the 132
  390. column mode.  W32.BAS restores the display to 25 x 80 when "q" is
  391. selected from the main menu.
  392.  
  393.                   -------------------------------------
  394.         After any print statement, the values of RR and CC are updated
  395. to reflect the new location that the cursor should be at.
  396. Example to retrieve the cursor position when mixing PRINT and Prnt:
  397.         LOCATE RR, CC : PRINT "String1";
  398.         Lokate CRSLIN,  POS(0) : Prnt "String2"
  399.         'output: String1String2
  400. ===========================================================================
  401. ReadScreen (a$, row, column)
  402.          Reads text from the screen into a string variable.  The
  403. first character is at (row,column) and the number read equals the length
  404. of the string.  It won't wrap to the next line in graphics modes.
  405. Usage:
  406.         a$ = SPACE$(n) : call ReadScreen (a$, row, column)
  407. To save the entire screen:
  408.         a$ = SPACE$(2000) : ReadScreen a$, 1, 1
  409. ===========================================================================
  410. Registration
  411.    I can't possibly test every combination of calls, parameters, modes and
  412. computers, so use this library at your own risk.  If registered, you may use
  413. the library in any program with no additional fees or aknowledgements, but not
  414. include it in another library and market it as part of your own library.  If
  415. in doubt, write for permission. Registration is $10, free if you have paid
  416. for any earlier versions.  Source code is $20 on 5 1\4 discs.
  417.  
  418.                Jim Paisley                            Version W3.2
  419.                10690 Allen Rd NW
  420.                Washington C.H.,Oh 43160
  421.  
  422.        Name     _________________________________________
  423.  
  424.        Address __________________________________________
  425.  
  426.                __________________________________________
  427.  
  428.  
  429. ===========================================================================
  430. SaveW (segment, TR, LC, BR, RC)
  431.         Saves the contents of the screen inside the window defined by
  432.         TopRow,Left Column,Bottom Row and Right Column into a dynamic
  433.         numeric array.  The coordinates of the window are pushed onto
  434.         the stack for CloseLastW and PrntW. The display
  435.         on the screen is not erased.  The contents of the window may be
  436.         restored by calling CloseLastW or CloseW.
  437.  
  438.        If 0 is passed as the segment, the contents of the window are
  439.        not saved, although the data for the window is still pushed onto a
  440.        stack.  This is used define a window for PrntW.
  441.        Example to define a window but not save it:
  442.              SaveW 0, 1, 1, 24, 80 : PrintW a$, 7, 1, 1
  443.  
  444.         An example to save  the entire screen:
  445.                 Rem $DYNAMIC
  446.                 REDIM a%(2000):' sets aside 4000 bytes of memory
  447.                 SaveW VARSEG(a%(1)), 1, 1, 25 ,80
  448.  
  449.         Note that in graphics modes, TR LC BR & RC are still TEXT coordinates.
  450.         For example, in SCREEN 12  TR and BR are 1 to 30, not 0 to 479.
  451.         To use graphics coordinates, call SaveWgra.
  452.  
  453.       -----------------------------------------------------------------
  454.      | THE ARRAY MUST BE DYNAMIC.  Use the $DYNAMIC metacommand at the |
  455.      | beginning of the program or sub in which the dim or redim       |
  456.      | statement occurs.  You may also force the  array to be dynamic  |
  457.      | by using variables for the dimensions.  This is most important  |
  458.      | when creating .exe files because they default to static arrays. |
  459.      | The editor\compiler defaults to dynamic.                        |
  460.      | Example: $dynamic                                               |
  461.      |          n=200:redim array%(n)                                  |
  462.      |          Call OpenW(2,7, varseg(array(1)), r,c,rr,cc)           |
  463.      | Putting 'REM $DYNAMIC' at the beginning of a program does NOT   |
  464.      | carry over to subs so put it in each SUB or FUNCTION.           |
  465.       -----------------------------------------------------------------
  466.  
  467.         W32 will not save windows to arrays larger than 65536 bytes.  Thus
  468.         it is not possible to save the entire screen in some graphics modes
  469.         unless some of the color planes are masked out or put in different
  470.         arrays (see MapMask), or the screen is split into 2 or 3 windows.
  471.         Screen 12 uses 153,600 bytes, and SCREEN 13 uses 64000.
  472.         If in doubt, use REDIM a%(0 to 32767) and W32 will not be able to
  473.         overwrite past the end of the array.
  474.  
  475.  
  476.                  <<<<  If you don't want to use    >>>>
  477.                  <<<<  these formulas, see WSize   >>>>
  478.  
  479.         Byte boundaries for:
  480.         LC in SCREEN 1 are 0, 4, 8,  12... 316
  481.         RC in SCREEN 1 are 3, 7, 11 15 .... 319
  482.         LC in SCREEN 7, 8, 9, 10, 11, 12 are 0, 8, 16, 24 .... 636
  483.         RC in SCREEN 7, 8, 9, 10, 11, 12 are 7, 15, 23, ....639
  484.         n = 1 in the following formulas if LC & RC are aligned on byte
  485.               boundaries and 3 if they are not.
  486.         ColorPlanes is 4 unless changed by MapMask.
  487.         Text coordinates apply to OpenW and SaveW in all modes.
  488.         Graphics coordinates apply to OpenWgra and SaveWgra.
  489.         ScrollU, ScrollD, ScrollL and ScrollR use text coordinates in
  490.         SCREEN 0 and graphics coordinates in other modes.
  491.  
  492.         SCREEN 0
  493.         Words = (BR - TR + 1) * (RC - LC + 1): REDIM a%(Words)
  494.  
  495.         Screen 1 with graphics coordinates
  496.         Bytes = (BR - TR + 1) * (RC - LC + n) / 4 : REDIM a%(Bytes / 2)
  497.  
  498.         Screen 2 with graphics coordinates
  499.         Bytes = (BR - TR + 1) * (RC - LC + n) / 8 : REDIM a%(Bytes / 2)
  500.  
  501.  
  502.         Screen 2 with text coordinates
  503.         Bytes = (BR - TR + 1) * (RC - LC + 1) * 8: REDIM a%(Bytes / 2)
  504.  
  505.  
  506.         Screen 7, 8, 9, 10,12 with graphics coordinates
  507.         Bytes = ((br - tr + 1) * (rc - lc + n))  / 8 * ColorPlanes
  508.         : REDIM a%(Bytes / 2)
  509.  
  510.  
  511.         Screen 7, 8, 9, 10,12 with text coordinates
  512.         Lines is 8, 14, or 16, depending on the character box size.  This
  513.         is in the QBasic manual under SCREEN.
  514.         Bytes = ((br - tr + 1) * (rc - lc + 1))  * Lines * ColorPlanes
  515.         : REDIM a%(Bytes / 2)
  516.  
  517.         SCREEN 13
  518.         Bytes = (BR - TR + 1) * (RC - LC + 1): REDIM a%(Bytes / 2)
  519.  
  520. ===========================================================================
  521. SetViewPage  (page)
  522.         Only pages 0 to 3 in SCREEN 0, 25x80 display are supported.
  523.         Defines the active page. Page is a number from 0 to 3. The
  524. default value is 0.  Typical usage is:
  525.         SCREEN , , page,page : SetViewPage page
  526. ===========================================================================
  527. SetViewW   ( TR, LC, BR, RC)      SCREEN 0 only
  528.       Defines the active portion of the screen.  Similar to
  529. Basic's VIEW PRINT [topline TO bottomline] statement except that
  530. columns is also a parameter.  All the routines in QB4Windows
  531. operate within these boundaries in text modes except ReadScreen and KLS.
  532. Use it to lock out the top or bottom line when that line is used
  533. for a menu.  The default values are set to the full screen by InitW.
  534. ===========================================================================
  535. ScrollU ( lines, tr, lc, br, rc)
  536. ScrollL ( columns, tr, lc, br, rc)
  537.  
  538. ScrollU,ScrollD,ScrollL,ScrollR scroll the window up,down,left or right.
  539. The information scrolled off the screen is lost, the lines or columns
  540. scrolled onto the screen are blanked using the specified Kolor.
  541.  
  542. Example:
  543.        ScrollD(2,1,1,25,80):'scrolls the entire screen down two lines
  544. If the number of lines or columns to scroll is greater than the number
  545. in the window, the entire window is blanked.
  546.  
  547.      In graphics modes, Columns, LC and RC will be moved to byte boundaries
  548. if necessary.  It will scroll left and right 8 pixels at a time (4 in
  549. SCREEN 1) and will only scroll by a single pixel in SCREEN 13.
  550. ==============================================================================
  551. W32.DEC
  552.         This is an include file which contains all the DECLARE statement
  553.         needed. Most of these include BYVAL declarations, allowing
  554.         numbers to be expressed in just about any form and automatically
  555.         converted to integers. It also contains two executable statements.
  556.         Since Lokate and Prnt need the addresses of RR and CC,
  557.         these are declared as global variables, then passed via InitW.
  558.                 COMMON SHARED RR AS INTEGER, CC AS INTEGER
  559.                 InitW  RR, CC
  560.  
  561.         I would prefer that you merge W32.DEC with any program you write.
  562.         If you wish to use '$INCLUDE:'W32.DEC',
  563.         COMMON SHARED statements must precede the $INCLUDE statement, and
  564.         other executable statements may not precede it.
  565. ===========================================================================
  566. WSize    (Bytes&, TR, LC, BR, RC)       Text coordinates in all modes
  567. WSizeGra (Bytes&, TR, LC, BR, RC)       Graphics coordinates
  568.  
  569.         Call WSize before OpenW or SaveW to determine the size of array
  570.         needed to save the window.  If SCREEN or MapMask are used they
  571.         must precede the call to WSize.  Typical usage:
  572.  
  573.                 '$DYNAMIC
  574.  
  575.                 SCREEN 12
  576.  
  577.                 MapMask 15
  578.  
  579.                 TR = 8: LC = 40 : BR = 12 : RC = 60
  580.  
  581.                 WSize (Bytes&, TR, LC, BR, RC)
  582.  
  583.                 IF Bytes& > 65536 THEN PRINT "ARRAY TOO LARGE" : END
  584.  
  585.                 REDIM A%(1 TO Bytes& / 2)
  586.  
  587.                 OpenW VARSEG(A%(1), TR, LC, BR, RC
  588. ===========================================================================
  589.