17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GW-BASIC <strong>User's</strong> Guide<br />

BSAVE Command<br />

Purpose:<br />

To save portions of user memory on the specified device.<br />

Syntax:<br />

BSAVE filename,offset,length<br />

Comments:<br />

filename is a valid string expression containing the filename.<br />

offset is a valid numeric expression within the range of 0 to 65535. This is the offset into the<br />

segment, declared by the last DEF SEG, where saving is to start.<br />

length is a valid numeric expression within the range of 0 to 65535, specifying the length of the<br />

memory image to be saved.<br />

If filename is less than one character, a "Bad File Number" error is issued and the load is<br />

aborted.<br />

Execute a DEF SEG statement before the BSAVE. The last known DEF SEG address is always<br />

used for the save.<br />

The DEF SEG statement must be used to set up the segment address to the start of the screen<br />

buffer. An offset of 0 and a length of 16384 specify that the entire 16K screen buffer is to be<br />

saved.<br />

Examples:<br />

10 DEF SEG=&HB800<br />

20 BSAVE"PICTURE", 0, 16384<br />

The DEF SEG statement in line 10 points the segment at the screen buffer.<br />

The BSAVE command in line 20 saves the screen buffer in the file named picture.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/BSAVE.html28/03/2004 21.29.13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!