The QBasic BSV format

QBasic generates BSV files using the BSAVE command. It is basically used to store arrays as a file. It also stores integer data containing the array memory segment, offset & length. The first byte is always equal to &HFD, or hexadecimal FD. The BSV structure is as follows:

Byte No. 1 2 & 3 4 & 5 6 & 7 8 - End of file
Data $FD Segment Offset Length Array data

Note that the BSAVE command can be used to save any array, irrespective of its contents. In this case however, the array data will in this case be the standard GET/PUT array:

Byte No. 1 & 2 3 & 4 5 > EOF
Data Absolute width * 8 Absolute height pixels (left to right, top to bottom)

A typical example of a GET/PUT image array:

Byte No. 1 & 2 3 & 4 5 6 7 8
Data 16 2 (clr @0,0) (clr @1,0) (clr @0,1) (clr @1,1)

The co-ordinates are relative - if the image was drawn using "PUT (0,0), img, PSET" then the co-ordinates shown would be correct.

Back to contents page

BSV Babel is copyright Trelsoft freeware.