If you're wondering what to do with QBSVGA.OBJ, this file hopefully clears
that up.  QBSVGA.OBJ is a compiled (object) version of QBSVGA.BAS.  Its
purpose is to solve two unrelated problems.  First problem:  when you write
a program to use QBSVGA.BAS, including the contents of that file at the
bottom of your program, you have memory problems when you go to compile
your program.  Second problem:  you have a Video7 SVGA instead of a VESA
SVGA and you don't like using the feature of QBSVGA described in FEATURE.ADV.
With the creation of QBSVGA.OBJ, the first part of the likely solution to
problems is the same:  don't put the contents of QBSVGA.BAS at the bottom
of your program.  Instead, follow the procedure outlined below.


Compile your program, with no explicit reference to QBSVGA.BAS other than
the calls to the subroutines and functions contained in it.  Use whatever
options on BC's command-line that you want.  (You might as well use the "/O"
option since QBSVGA.OBJ explicitly references the stand-alone library
BCOM45.LIB anyway.  Also, I'm assuming you're working from the DOS command-
line; I'm not sure how to tell you to use QBSVGA.OBJ from within the QB IDE.)

Then, use the LINK command to link your program with QBSVGA.OBJ.  One
syntax is

LINK your_program QBSVGA,,,QB;

This syntax takes "your_program" to be the name of your .BAS file and
assumes that QB.LIB is either in the current directory or that you've
SET a DOS environment variable (LIB) specifying where QB.LIB is on your
system.  (This syntax also creates a file your_program.MAP.  I just delete
such files.  If you know what to do with it, feel free to do whatever that
is--in which case, you obviously don't need me to tell you how to use LINK!
<g>)  Another syntax is

LINK your_program QBSVGA

This syntax will cause a few prompts for information to appear.  Just
press ENTER in response to all but the third of these prompts.  This third
prompt is for the name of the library to use.  For this prompt, specify
QB (include the path if you don't have a DOS LIB variable defined).  (If
you leave off the ";" on the first syntax, you may also get a prompt,
depending on what LINKer you use, probably for a "definitons file," or
something like that.  You can just press ENTER in response.)


If you have a VESA SVGA and your only problem is a memory overflow, skip
the rest of this.  However, if you're reading this primarily to figure out
what to do with your Video7 SVGA, read on.  Video7 users should first
follow the same procedures as above.  The issue here, however, is what
subroutines you call in your routine.  Basically, you DO NOT call BSCREEN
or BCLS if you have a Video7 system--unless you've found the correlation
between your Video7 video mode integers and your OEM SVGA mode integers, and
you're using the feature described in FEATURE.ADV.  If you want to explicitly
use Video7 video modes, you can--as long as you use QBSVGA.OBJ.  Just call
VSCREEN instead of BSCREEN and use VCLS to clear the screen instead of using
BCLS.

Some words of warning are in order for Video7 users.  VSCREEN is not quite
as versatile as BSCREEN.  With BSCREEN, you can, for example, just tell it
you want to use QBSVGA mode 15 and BSCREEN will call FINDVESA and find the
VESA bios mode that gives you the 800 x 600 x 16 resolution, or tell you that
you don't have such a video mode.  VSCREEN does NOT do any of that.  It makes
a specific correlation between QBSVGA modes and Video7 modes.  This
correlation is given by the following table.


QBSVGA Mode        Resolution/Colors        Video7/bios Mode (hex)

    14              640 x  480 x 256                  67
    15              800 x  600 x  16                  62
    16              800 x  600 x 256                  69
    17             1024 x  768 x  16                  65
    18             1024 x  768 x 256                  6A
    19             1280 x 1024 x  16                  70
    20             Doesn't exist; don't use it!
    21             Doesn't exist; don't use it!
    22             Doesn't exist; don't use it!
    23              132 x   25 x 256 (or more)        41
    24              132 x   43 x   2                  42


Note that some of the video modes that might be allowed with a VESA SVGA
aren't allowed.  Modes 14 - 19 are graphics modes; modes 23 and 24 are
text modes.  Mode 24 (42h) is supposed to be a monochrome mode.  You may
find, however, that it supports more than 2 colors.  (My system gets 256
in this mode.)  If the above correlation is a problem for you, you can
still try to use the MODE## feature described in FEATURE.ADV.  Just make
sure you use the Video7/bios mode when using VSCREEN and VCLS, not the
OEM/bios mode.  (Of course, to say it again, if you use the MODE## feature
with OEM modes, you should be able to use BSCREEN and BCLS, making this
discussion somewhat irrelevant.)

If you're interested in knowing what the correlation is between your OEM
and Video7 bios video modes, you can run the program V7.  It will identify
the Video7 modes that you have support for and also show you this
correlation.  (See V7.TXT--and I'll repeat a warning given there:  you may
want to turn your monitor off while running V7 in case you're worried about
possible monitor damage while V7 tries to put your screen in video modes that
it doesn't know a priori that you have support for.  (Type "V7" at the DOS
prompt and then, before pressing ENTER, turn your monitor off--and then press
ENTER.  V7 will beep at you to let you know it's finished.))  VEGA will also
confirm whether or not you have Video7 support and also, if you specify a
hex bios mode integer (NOT a QBSVGA mode integer), it will give you
information about that mode.  (VEGA is a variant of Video7.  QBSVGA.OBJ
should also work with it--but you may need the MODE## settings.)

In case you're wondering how I made QBSVGA.OBJ, it's quite simple.  Put
the contents of the new REGTYPE.INC at the top of QBSVGA.BAS and then
execute the following DOS command:


BC QBSVGA /AH /V /O;


You can leave off the "/O" if you want to use the runtime library.  (Be sure
to use the original QBSVGA.BAS if you're just going to incorporate it
explicitly at the bottom of your .BAS file.)

If you prefer to run things from within QB's interpreter, your only
option so far has been to explicitly put the code in QBSVGA.BAS in your
program, at least you may think that's the case.  Well, advanced users of
QB may have already figured this out (as well as how to make a QBSVGA.OBJ
file), but you had another option all along.  You could have made a
QBSVGA.OBJ file and then created a Quick Library.  Since you now have
QBSVGA.OBJ, I'll show you here how to make such a library for use with
QB.EXE.  First, there would ordinarily be a problem using a Quick Library
with QB.EXE because you can't use more than one at a time and you would
already need to use QB.QLB in order to get access to the INTERRUPTX
subroutine.  Hence, making a QBSVGA.QLB might not seem to be of much
benefit.  The way around this problem is to use the LIB command to get
the INTERRUPTX routine.  You do this by applying LIB to the regular
library QB.LIB.  The DOS command for this operation is

LIB QB *INTRPT;

This will produce the file INTRPT.OBJ on your disk.  This is an object
file contained in QB.LIB that in turn contains the INTERRUPTX routine.
(It also contains the INTERRUPT subroutine.  Also, DO NOT UNDER ANY
CIRCUMSTANCES, by mistake or whatever, put a "-" after (or even before)
the "*"; that will delete INTRPT.OBJ from QB.LIB--you don't want to do
THAT.  (The "*" means copy object file from library.))  If you leave off
the trailing semicolon, you'll get a prompt for a list file name; just
press ENTER.

Since you may also, in conjunction with using QBSVGA, want to make calls
to the ABSOLUTE subroutine.  Hence, let's get that out of QB.LIB too.  As
it turns out, the ABSOLUTE routine is contained within ABSOLUTE.OBJ (inside
of QB.LIB).  The DOS command is

LIB QB *ABSOLUTE;

You now have INTRPT.OBJ and ABSOLUTE.OBJ in addition to QBSVGA.OBJ on your
disk.  You need to put these into a Quick Library.  Here's the DOS command:

LINK /Q QBSVGA.OBJ INTRPT.OBJ ABSOLUTE.OBJ, QBSVGA.QLB,,BQLB45.LIB;

(Don't forget the trailing semicolon and the repeated commas are NOT a
typo.  This will create a QBSVGA.MAP file when it's done in addition to
QBSVGA.QLB.  You can delete the .MAP file.)

Now, when you run QB.EXE, put /L QBSVGA on the command-line.  (You still
need REGTYPE.INC at the top of your program.)

If you want to make a regular library, e.g., QBSVGA.LIB, for use with
LINK (either from the DOS command-line or when making a .EXE from within
QB), you can use the LIB command:

LIB QBSVGA +QBSVGA+INTRPT+ABSOLUTE;

(If you're working straight from DOS, you don't need to include the INTRPT
and ABSOLUTE object routines.  Instead, when you link using QBSVGA.LIB,
also use the auxiliary library QB.LIB.  (You don't need QB.LIB for the
ABSOLUTE routine; it's the INTERRUPTX routine that you need QB.LIB for.)
Also, you of course still need REGTYPE.INC at the top of your .BAS file.)

Previous versions of QBSVGA.OBJ included code for Video7 systems.  This
code is now contained in the separate object module VIDEO7.OBJ.  To use it,
simply add this file name to the list of other object modules in the
commands desribed above, e.g.,

LIB QBSVGA +QBSVGA+INTRPT+ABSOLUTE+VIDEO7;

Note that it needs to be used in addition to QBSVGA.OBJ.  If you have a
Video7 system, instead of calling BSCREEN and BCLS, use VSCREEN and VCLS,
respectively.  The syntax is the same.
