BSAVE string1, number1, number2


This statement writes the block of memory beginning at offset number1 from the start of the data segment for a length of number2 bytes to the file specified by string1. This data may be later loaded by BLOAD. If DEFSEG has been set, it will be used as the data segment, otherwise, the default ASIC data segment will be used.
Number2 should be in the range of 1 to 32767.


DEFSEG = &hexB800 BSAVE "SAVED.DAT" 0 4000
After execution of these statements 4000 bytes at offset 0 bytes from the start of the override data segment (which in this case happens to point to the beginning of video memory for a CGA card) will be written to the file "SAVED.DAT". Assuming a CGA card was present, the current screen would be saved to disk, assuming you are not in graphics mode.


If ASIC detects an error executing this command, it will set the system ERROR variable. These error codes are listed in the Error Messages Chapter of the ASIC Manual.

See Also