CALL ABSOLUTE under QuickBasic 4.5

I'm trying to port my WAV player library to QuickBasic 4.5, and I've

encountered a problem... The help guide says it uses the same format as any

other BASIC does, i.e. the parameter of an integer to say which memory location

to call.

However, when I try running my program, it gives me the error "Subprogram not defined"

at the CALL statement. It apparently doesn't recognize the CALL ABSOLUTE as it's

own type of function.

Does anyone know the correct way the use CALL ABSOLUTE under QuickBasic 4.5?


URL:http://acheronx.ml.org/home/

Comments

  • : I'm trying to port my WAV player library to QuickBasic 4.5, and I've

    : encountered a problem... The help guide says it uses the same format as any

    : other BASIC does, i.e. the parameter of an integer to say which memory location

    : to call.

    : However, when I try running my program, it gives me the error "Subprogram not defined"

    : at the CALL statement. It apparently doesn't recognize the CALL ABSOLUTE as it's

    : own type of function.

    : Does anyone know the correct way the use CALL ABSOLUTE under QuickBasic 4.5?


    Hi Matt,


    It is Andrew Smith here. What you are doing wrong is that

    you are not loading the QB library. If you try at the command prompt:

    qb /l it will load the library (/l) and the program will work.


    Hope it helps,

    Andrew





  • That was exactly the problem... turns out I don't even

    have to alter anything from QBASIC... Any particular reason

    you need to specify to load the library? If it's so vital to

    program operation, you'd think they'd do it automatically...


    Matthew Gross

    Acheron@Hotmail.com


    URL:http://acheronx.ml.org/home/

  • Hi Matt,

    I agree with you on the automatic load of the library. It is

    not SO important because it is only used with mous routines, wav

    stuff etc. I think mainly with interaction of other languages.

    But for e.g. the mouse - The qb library has the picture of the

    cursor so you just use that instead of drawing it.


    If you have a link of Qbasic in Win95 (say on the desktop), just right-click

    and choose properties. Then for the shorcut instead of qb.exe, make

    it qb.exe /l because then it will always load the library.


    The only prob I was wondering was when you compile it, will it add the library functions?


    Anyway, like to be of assistance,

    Andrew





  • : The only prob I was wondering was when you compile it, will it add the library functions?




    Hi,


    The QB45 IDE has the 'Make EXE' option from the Run menu. If you use this to make an EXE, the .LIB versions of any QuickLibrary you specified on the command line to QB will automatically be included in the link, provided that the .LIB is available. In the case of CALL ABSOLUTE, it means that you will need QB.QLB to you run your program from the interpreter, and QB.LIB if you decide to compile. This works the same for any QLB/LIB you want to include (you can use the /l switch to include other libraries as well, but you will need to declare any subs/functions you use from QB. Note that this is another way you can use routines from another programming language, provided that you use the PASCAL calling convention and the MEDIUM memory model).


    One small question from me: Does any of you know how QuickBasic represents its strings? I would like to know for when I need to create routines in another language that require a string as parameter. Thanks, and I hope my information was useful.


    Happy programming :)

    Mark


  • Start QB like this: QB /L


    NOTE: QB doesent have call absolute,

    but when you type QB /L then it loads a library

    file containing the ABSOLUTE function


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories