advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
BLOAD, BSAVE Statements Details
  Summary  Details  Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 BLOAD filespec$[,offset%]
 BSAVE filespec$, offset%, length%
 
 Usage Notes
   ■ You can use BSAVE and BLOAD to save a screen image to a file and later
     restore that image from disk to memory. However, this could interfere
     with any forms that are present on the screen. To use BSAVE and BLOAD
     with forms, you should first unload or hide any visible forms.
     See: HIDE Method  UNLOAD Statement
 
   ■ The BSAVE statement allows data or programs to be saved as memory-image
     files on disk. A memory-image file is a byte-for-byte copy of what is in
     memory as well as control information used by BLOAD to load the file.
 
   ■ The BLOAD statement allows a program or data saved as a memory-image
     file to be loaded anywhere in memory.
 
   ■ The starting address for loading is determined by the specified offset
     and the most recent DEF SEG statement. If offset% is omitted, the
     segment address and offset contained in the file (the address used in
     the BSAVE statement) are used. Thus, the file is loaded at the address
     used when saving the file. See: DEF SEG Statement
 
   ■ If you supply an offset, the segment address used is the segment set by
     the most recently executed DEF SEG statement. If there has been no DEF
     SEG statement, the Visual Basic data segment (DGROUP) is used as the
     default.
 
   ■ If the offset is a long integer, or a single- or double-precision
     number, it is converted to an integer. If the offset is a negative
     number between -1 and -32,768, inclusive, it is treated as an unsigned
     2-byte offset.
 
   ■ Do not use BLOAD to load a file into an expanded memory array. Do not
     use BSAVE to transfer an expanded memory array to an output file.
 
   ■ If you start Visual Basic (VBDOS.EXE) using the /Ea switch, any of these
     arrays may be stored in expanded memory:
     • Numeric arrays < 16K in size
     • Fixed-length string arrays < 16K in size
     • User-defined-type arrays < 16K in size
 
   ■ If you want to use BLOAD to load a file into an array (< 16K), or if you
     want to use BSAVE to transfer an array (< 16K) to an output file, start
     Visual Basic (VBDOS.EXE) without the /Ea switch. Without the /Ea switch,
     no arrays are stored in expanded memory.
     See: VBDOS Command-Line Options
 
   ■ Programs written in earlier versions of Microsoft Basic no longer work
     if they use VARPTR to access numeric arrays. See: VARPTR Function
 
   ■ Because BLOAD does not perform an address-range check, it is possible to
     load a file anywhere in memory. Be careful not to write over Visual
     Basic or the operating system.
 
   ■ Because different screen modes use memory differently, do not load
     graphic images in a screen mode other than the one used when they were
     created. See: Screen Mode Summary