Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BLOAD BSAVE

Status
Not open for further replies.

quebasic2

Programmer
Dec 17, 2002
174
IN
Can someone explain indepth how these commands work, or point me to a good tutorial. Thanks
 
in text mode
DEF SEG &HB800
bsave "my.scn",pg&*4096,4096
DEF SEG 'reset segment
will save 1 page (pg& being page number 0-7 (8 pages max)

DEF SEG &HB800
bload "my.scn",pg&*4096
will load the page starting at upper left (1,1) for page
pg& (0-7)

Used with screen 0,1,apage,vpage and pcopy pg1,pg2
apage is the page written to
vpage is the page displayed

can make screen displays look almost instantaneous.

with graphics modes it's used with an array usually.
I'll let someone else go into detail about that.
 
bsave allows you to save data at segment:eek:ffset for later use and then use bload to load it back up at segment:eek:ffset when you want to use it

the syntax for bsave is

defseg=segmentofmemorytosave
bsave "nameoffiletosaveto",offsetofmemorytosave,amountofmemorytosave
defseg

the syntax for bload is

defseg=segmenttoloadmemoryto
bload "nameoffiletoload",offsettoloadmemoryto
defseg

 
Note the size limit, 64k
So please tell me how one could deal with graphic screen, that is definitely bigger?

Here what Help says:
Code:
BSAVE copies the contents of an area of memory to a file.
BLOAD loads a file created by BSAVE into memory.

BSAVE filespec$, offset%, length&
BLOAD filespec$[,offset%]

    _ filespec$    For BSAVE, a file to which an area of memory (a
                   byte-for-byte memory image) is copied. For BLOAD,
                   a memory-image file created by a previous BSAVE.
    _ offset%      For BSAVE, the offset of the starting address of the
                   area of memory being saved. For BLOAD, the offset of
                   the address where loading starts.
    _ length&      The number of bytes to copy (from 0 through 65,535).

    _ The starting address of the memory area saved or loaded is determined
      by the offset and the most recent DEF SEG statement.
 
Sorry, had to think first ;)
>So please tell me how one could deal with graphic screen, that is definitely bigger?
There is a faq314-136 by Alt255,
that shows how to save screen if it fits in 64k.
But that method uses GET - so I just could GET (and BSAVE) several parts of screen so each fits in 64k.
(screen 12 size is 153600 bytes, BTW)
 
I have never dealt with BLOAD-SAVE how do I know what the byte offset is, or how much I want to copy of it?
 
For graphics screen modes bloading is essitially the
same as with text mode (at least syntax) the difference
will be the segment offset

def seg =&HA000
bload "my.pic",offset
def seg

this will be a previously bsaved "picture"
offset is the starting point on the screen to load it.
(in pixels)
 
So how do you bsave a graphic? Please excuse my ignorance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top