Dec 312017
More stuff on basic video pages.
File TEXT.ZIP from The Programmer’s Corner in
Category Various Text files
More stuff on basic video pages.
File Name File Size Zip Size Zip Type
TEXT.TXT 3584 1529 deflated

Download File TEXT.ZIP Here

Contents of the TEXT.TXT file

Some words about video pages in IBM BASICA

There are a few things IBM didn't tell you about BLOADing and BSAVEing
the video buffer. At least, they didn't come right out and tell you. This
discussion is aimed in particular at the color buffer in text mode. I'll use
80 column width in my examples.

In width 80, there are four video pages numbered 0-3. Page 0 is the
default active and visual page. When you have text or line-graphics (produced
by CHR$) and you wish to save the screen, you are told to use a file length of
&H4000 (16k bytes) to save the entire buffer. This results in saving the page
you want, page 0, but also the blank pages 1 through 3. There is no reason to
save these extra pages, so why do it? Using a file length of &H1000 (4k) will
result in only saving the current page 0.

By the same token, you can also save only page 2, for example. If your
program switches between screens, maybe for a reference screen, you might only
want to save page 2. This can be done using the statement

BSAVE "PICTURE",&H2000,&H1000

Here, &H2000 sets the offset (from the DEF SEG statement) to the start of page
2 of the buffer. The &H1000 specifies that only the next 4k is to be saved,
this is the size of one video page.

Likewise, you can BLOAD a screen onto any video page. To load the
previous screen image onto page 3, for example, we'd use this statement:


Having previously set the segment address to the start of the video buffer,
&HB800, with the DEF SEG statement, the offset of &H3000 will cause the file
PICTURE to be brought in starting on page 3. Note that if PICTURE is 16k long,
you'll end up BLOADing beyond the screen buffer. Needless to say, this can
have dire consequences and you probably shouldn't do it.

The same approaches will work in 40 columns if you notice that the
screen image now only occupies 2k, hence giving you eight pages. Saving page
2 would then require the statement:

BSAVE "PICT40",&H1000,&H0500

I'm sure that many of you realized this a long time ago. But for some
of us, it's not intuitively obvious. It's really not covered as well as most
of the topics in the IBM BASIC manual, which I consider to be a fairly well
written and clear manual. For those of you who weren't aware of this, here it
is. Hopefully you can make use of the information. Saving screens one page at
a time will come in handy if you decide to make custom menus and load them as
images into the buffer. This is a plug for a screen design program I'll be
putting up here soon, after I finish the documentation. Watch for it!

If you have any questions or futher things about the buffer and how
images are saved, drop me a note. I'm no genius and would like to learn more
about all this. I can be reached on this board (Laurel RBBS) or at:

6926 Hanover Parkway #403
Greenbelt, MD

Brian Mary

P.S. Don't forget, watch for EDS! Coming soon to a bulletin board near you!

 December 31, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>