ASM, interrupt Call, call absolute

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
SebMcClouth
Veteran
Posts: 240
Joined: Fri Apr 29, 2005 2:20 am
Location: Inside the Matrix

ASM, interrupt Call, call absolute

Post by SebMcClouth »

I have noticed they combining these ASM (ASM and call absolute are together, I now) and interrupt call, go straight in not being able to run the program at all. Is there a way to get around this?

grtz
Macric
Coder
Posts: 34
Joined: Fri Mar 25, 2005 11:11 pm
Location: Mexico

Post by Macric »

would you please try to explain some more extensively? thank you
User avatar
SebMcClouth
Veteran
Posts: 240
Joined: Fri Apr 29, 2005 2:20 am
Location: Inside the Matrix

Post by SebMcClouth »

If I combine

Code: Select all

CALL ABSOLUTE 
and

Code: Select all

CALL INTERRUPT  or CALL INTERRUPTX
together in a program e.g. using CALL ABSOLUTE to get info on the CPU and CALL INTERRUPT to get info on the videocard, QB 4.5 says it can't find the

Code: Select all

SUB ABSOLUTE
, eventhough I have

Code: Select all

'$include:'qb.bi'
included.

grtz
User avatar
Kyle
Veteran
Posts: 107
Joined: Thu Apr 14, 2005 2:41 pm

Post by Kyle »

Have you loaded QB with the /L switch?
User avatar
SebMcClouth
Veteran
Posts: 240
Joined: Fri Apr 29, 2005 2:20 am
Location: Inside the Matrix

Post by SebMcClouth »

Yes I always load QB with /L switch.

grtz
Plasma

Post by Plasma »

The problem is most likely that the CALL ABSOLUTE declare in QB.BI conflicts with your CALL ABSOLUTE statements in your program. This is because CALL ABSOLUTE is declared with only one parameter in QB.BI, but the assembly routines you are using take multiple parameters.

To fix this, just remove the CALL ABSOLUTE declare in QB.BI.
User avatar
SebMcClouth
Veteran
Posts: 240
Joined: Fri Apr 29, 2005 2:20 am
Location: Inside the Matrix

Post by SebMcClouth »

So... one question: how can I use CALL ABSOLUTE if I remove it from QB.BI...

grtz
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

By using: CALL
I have left this dump.
User avatar
SebMcClouth
Veteran
Posts: 240
Joined: Fri Apr 29, 2005 2:20 am
Location: Inside the Matrix

Post by SebMcClouth »

Wouldn't I then have to define in my program:
DECLARE SUB ABSOLUTE()

Grtz
Guest

Post by Guest »

No. Only functions and subs without CALL have to be declared.
User avatar
SebMcClouth
Veteran
Posts: 240
Joined: Fri Apr 29, 2005 2:20 am
Location: Inside the Matrix

Post by SebMcClouth »

So by removing Absolute from qb.bi it should work.
Right??

grtz
User avatar
Kyle
Veteran
Posts: 107
Joined: Thu Apr 14, 2005 2:41 pm

Post by Kyle »

Try it. Let us know if you get it working.
User avatar
SebMcClouth
Veteran
Posts: 240
Joined: Fri Apr 29, 2005 2:20 am
Location: Inside the Matrix

Post by SebMcClouth »

@ first sight it seems to work. I'll keep U all posted on this.

grtz
Post Reply