No announcement yet.

Porting VBDOS/QBasic Questions

  • Filter
  • Time
  • Show
Clear All
new posts

  • Porting VBDOS/QBasic Questions

    Hi --

    I'm exploring the capabilities of PB/DOS, as it may offer a solution
    to a problem.

    I'm currently maintaining a very large program, written in BASIC
    that has a number of quirks that are making it difficult to port.

    The appliocation is approx. 15 years old, and now consists of 500+
    executibles. We compile it with the VBDOS compiler, although we
    don't take advantage of any of the "visual" stuff... so basically,
    its nothing more than a glorified QB45 program. It would probably
    compile under QB45.

    I have a few questions and I hope I get good answers!

    1. Max code segment size with PB/DOS? One problem we have with
    a program right now is that the code segment (compiled) hits
    the 64k segment limit of the VBDOS compiler, and hence, won't compile.

    2. CHAIN compatibility with VBDOS compiled programs? Can one program
    compiled under VBDOS CHAIN to a program compiled with PB/DOS?

    3. Libraries: support for QB and VBDOS style .LIBs?

    4. Variable naming "challenges"... This is probably the worst aspect
    of the code I"m maintaining! Some variables have the same name, but
    different types. Under the VBDOS compiler, n#, n%, and n$ are recognized
    as 3 different vars. Some compilers don't deal with this, and it's
    a poor programming practice... how does PB/DOS deal with this?

    I don't think PB/CC is an option for this program because there are too
    many low level DOS dependencies.


    --Chris Bradford


  • #2
    In DOS, a segment can only cover a range of 64k. PB/DOS can't change that.
    However, you can use the $SEGMENT metastatement to divide your code into
    multiple segments.

    CHAIN is compiler-dependent. You can't mix and match VB/DOS and PB/DOS
    chained units. If you don't have any values to transfer between programs,
    or can store them in a file rather than using COMMON blocks, you can use
    RUN instead of CHAIN. RUN is not compiler-dependent.

    PowerBASIC uses .PBL libraries. These are not compatible with .LIB or .QLB

    PB/DOS has no problem with variables of the same name but different type.

    Tom Hanlin
    PowerBASIC Staff