64k code barrier

 BBS: Inland Empire Archive
Date: 04-08-93 (17:04)             Number: 350
From: CRAIG PALAZZO                Refer#: NONE
  To: JON SPRINGER                  Recvd: NO  
Subj: 64k code barrier               Conf: (2) Quik_Bas
To take this a bit further the Rob did.......

In the QB/QBX editor(s) select File from the menu bar. Now select file
create. You will be asked what type of file is this is to
be, check module .BAS. You now have another 64k of program
space. This sounds simple (and is), however you will find
some new factors involved in your applications. As an
alternative you could use libraries. These add the same new
factors that modules present. However storage is more
efficient and routines in libraries can be used across many
applications. It is best to keep your routines as generic
or stand alone as you can.

Try this.........

---------CUT HERE-----------
'This function returns a pointer to
'the start of video memory. This is
'very crude and hardware specific.
FUNCTION VidSeg%
        DEF SEG = 0
        IF PEEK(&H463) = &HB4 THEN
                VidSeg% = &HB000
        ELSE
                VidSeg% = &HB800
        END IF
        DEF SEG
END FUNCTION
---------CUT HERE-------------

'Main Module
'You can use the VidSeg function for two things,
'1) Determine display type (color or mono)
'2) As a base pointer into the video segment.

DECLARE FUNCTION VidSeg%

DEF SEG VidSeg%
basePtr% = VidSeg%
WHILE basePtr% <= 4000
        POKE basePtr%, 127
        basePtr% = basePtr% + 1
WEND
DEF SEG

Now take the part that says cut and save it in a .BAS file that has only that
function in it. Now compile the file using BC and then, use
LINK with the
/Q command line option to create a .QLB quick library or
LIB to create a linkable .LIB file. VidSeg% is now in a
library that can be used by any program. To use the VidSeg
routine in a program in the QB editor use the /L command
line switch when you start QB ( QB /L YOUR.QLB ).

--- Maximus 2.01wb
 * Origin: |=[Bloom Co. Hospital>=--- |[GRapids,MI] (616)361-8345 (1:228/26)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET