Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Proclip2 Library - <b> savebox() </b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SAVEBOX() 

          The SAVEBOX function provides the programmer with a method of
          saving partial screen images into character memory variables and,
          using the RESTBOX function, restore them back when needed.

          SAVEBOX will allow the programmer to save any area of the screen
          which contains at least one (1) character and up to the entire
          screen (4000 bytes).  This allows multiple "snapshots" of various
          area of the screen using the minimum amount of memory necessary.

          As a temporary storage buffer is required for the screen area
          during the snapshot, this function temporarily allocates memory
          from DOS.  If insufficient memory is available the function will
          refuse to perform and none of the screen area will be saved.  It is
          very unlikely that this could happen as even the entire screen
          requires less than 4Kb for temporary storage.


      Format: 

               <memvar> = savebox(top, left, bottom, right [,type])


      Parameters: 

               top.......Numeric variable or constant indicating the top row
                         of the area to be saved.  Value checked to be
                         between 0 and 24 inclusive.

               left......Numeric variable or constant indicating the left
                         column of the area to be saved.  Value checked to be
                         between 0 and 79 inclusive.

               bottom....Numeric variable or constant indicating the ending
                         row of the area to be saved.  Value checked
                         of the area to be saved.  Value checked to be
                         between 0 and 24 inclusive.

               left......Numeric variable or constant indicating the left
                         column of the area to be saved.  Value checked to be
                         between 0 and 79 inclusive.

               bottom....Numeric variable or constant indicating the ending
                         row of the area to be saved.  Value checked.

                         .T.    DEFAULT.  If not specified, the
                                        function will use DMA screen
                                        updating.

                         .F.            Setting this flag to a logical false
                                        will cause the function to use the
                                        standard BIOS INT 10H for screen
                                        updating.


      Examples: 

               1.   To save the screen data, and attributes, into a memory
                    variable from row #10, column #20 through row #12, column
                    #60.

                    .
                    .
                    .
                    scrnarea = savebox(10,20,12,60)
                    .
                    .
                    .


      Returns: 

               <memvar>..A character string variable which contains the data
                         as it was read from the screen preceded by four (4)
                         bytes of control information.


      Cautions: 

               Do not modify the contents of the memory variable after it is
               returned from SAVEBOX.  The results may not be as you desire.

See Also: RESTBOX()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson