BSAVE and BLOAD are commands in many versions of BASIC that handle copying RAM to and from a binary file, often called a "BSAVE image," which may represent various raw image formats used by video display controllers. Some systems offered a BRUN command that would load and immediately execute the file as machine code. These files had no compression, enabling quick loading in native mode. BSAVE files were widely used during the introduction of the IBM PC and the Apple II. Although the commands existed on the Commodore PET, they were dropped from the popular Commodore 64 and VIC-20 but later restored in the 1985 Commodore 128 with Commodore BASIC 6.9.
Origin
Some versions of BASIC for home computers in the late 1970s and early 1980s include the command BSAVE (for "Binary Save") and the complementary BLOAD ("Binary Load"). Using the BSAVE command, a block of memory at a given address with a specified length can be written to disk as a file.2 This file can then be reloaded into memory via BLOAD.3
Microsoft produced the BASIC interpreters that were bundled with the Apple II (1977), Commodore PET (1977), and IBM PC (1981) which included BSAVE and BLOAD.
A BSAVE command is also part of ASCII's MSX-DOS2 Tools for MSX-DOS version 2.4
ColorBASIC
On the Color Computer's ColorBASIC, those were named SAVEM and LOADM instead, with the M referring to machine code, showing that the primary intent was to load programs rather than data; the use of the B prefix to refer to binary indicates a broader view of the possible uses of the command. ColorBASIC uses a different format than GWBASIC. LOADM supports multipart content to be loaded in different places in RAM, which some programs do use, even though SAVEM supports only saving one part. The cassette equivalents were called CLOADM and CSAVEM. In ColorBASIC, the BRUN command is called EXEC instead.
Video images
The BSAVED format is a device-dependent raster image format; the file header sometimes stores information about the display hardware address, and the size of the graphics data. The graphics data follows the header directly and is stored as raw data in the format of the native adapter's addressable memory. No additional information, such as screen resolution, color depth and palette information, bit planes and so on, is stored.
See also
- Microsoft BASIC Manual BSAVE Command
- Microsoft BASIC Manual BLOAD Command
- Apple II DOS & Commands FAQ
- AppleSoft FAQ
- Commodore 128 Personal Computer System Guide Commodore Business Machines, Ltd. 1985
- C64 Image Formats Part 1
- Pictor PC Paint File Format Summary
External links
Wikibooks has a book on the topic of: QBasic- How to Save Color Registers After BSAVE of (PICEM) Graphics
- Complete Instructions to BLOAD and BSAVE EGA and VGA Screens
- How to BLOAD/BSAVE Multiple Screen Pages for EGA Screens 7–10
- The Commodore 128: The Most Versatile 8-Bit Computer Ever Made
References
"Microsoft QuickBasic 4.5 Advisor: BSAVE". Microsoft. 1990. Retrieved 2007-07-17. http://www.qbasicnews.com/qboho/qckadvr.bsaver.shtml ↩
"Microsoft QuickBasic 4.5 Advisor: BSAVE". Microsoft. 1990. Retrieved 2007-07-17. http://www.qbasicnews.com/qboho/qckadvr.bsaver.shtml ↩
"Microsoft QuickBasic 4.5 Advisor: BLOAD". Microsoft. 1990. Retrieved 2007-07-17. http://www.qbasicnews.com/qboho/qckadvr.bloadr.shtml ↩
MSX-DOS2 Tools User's Manual by ASCII Corporation https://archive.org/details/MSXDOS2TOOLS ↩