Friends, I'm using quick basic 4.5 and I have a problem with running assembly procedures. Whenever I use CALL ABSOLUTE statements the compilers flags an error message "SUB PROGRAM NOT DEFINED".
The same program perfectly runs in the qbasic 1.1 compiler provided with MS-DOS 6.22
While going through the Online quick basic help I found instructions related to the use of CALL ABSOLUTE statement. According to it, qb should use qb.qlb as the default library ( and is using off course!) and I should properly link my program to the appropriate library, but I don't know how to link my program to libraries and also I don't know which library to link.
The problem remain same when I run the program in Quick Basic Extended which I downloaded from this site.
I'm new to basic programming :-[ please help.
Also tell me that does Quick Basic Extended version provided on this site is the same what is called Quick Basic 7.1 ( this compiler was listed under the name of Quick Basic 7.1)
PROBLEM WITH 'CALL ABSOLUTE'
Moderators:Administrator, Global Moderator
- varshney_sp
- Newbie
- Posts:3
- Joined:Mon May 03, 2004 3:07 am
- Location:India
Re: PROBLEM WITH 'CALL ABSOLUTE'
You need to include the QB.BI file also. Copy the code from the bottom of this post, paste it into Notepad and save it in your QB directory as QB.BI.
Then at the beginning of your program, add this line.
Then at the beginning of your program, add this line.
Code: Select all
'$INCLUDE: 'QB.BI'
Code: Select all
'***
' QB.BI - Assembly Support Include File
'
'Copyright (C) 1987 Microsoft Corporation
'
' Purpose:
' This include file defines the types and gives the DECLARE
' statements for the assembly language routines ABSOLUTE,
' NTERRUPT, INTERRUPTX, INT86OLD, and INT86XOLD.
'
'***************************************************************************
'
' Define the type needed for INTERRUPT
'
TYPE RegType
AS INTEGER
AS INTEGER
AS INTEGER
AS INTEGER
AS INTEGER
AS INTEGER
AS INTEGER
flags AS INTEGER
END TYPE
'
' Define the type needed for INTERUPTX
'
TYPE RegTypeX
AS INTEGER
AS INTEGER
AS INTEGER
AS INTEGER
AS INTEGER
AS INTEGER
AS INTEGER
flags AS INTEGER
AS INTEGER
AS INTEGER
END TYPE
'
' DECLARE statements for the 5 routines
' -------------------------------------
'
' Generate a software interrupt, loading all but the segment registers
'
DECLARE SUB INTERRUPT (intnum AS INTEGER,inreg AS RegType,outreg AS RegType)
'
' Generate a software interrupt, loading all registers
'
DECLARE SUB INTERRUPTX (intnum AS INTEGER,inreg AS RegTypeX, outreg AS RegTypeX)
'
' Call a routine at an absolute address.
' NOTE: If the routine called takes parameters, then they will have to
' be added to this declare statement before the parameter given.
'
DECLARE SUB ABSOLUTE (address AS INTEGER)
'
' Generate a software interrupt, loading all but the segment registers
' (old version)
'
DECLARE SUB INT86OLD (intnum AS INTEGER,_inarray(1) AS INTEGER,_outarray(1) AS INTEGER)
'
' Gemerate a software interrupt, loading all the registers
' old version)
'
DECLARE SUB INT86XOLD (intnum AS INTEGER,_ inarray(1) AS INTEGER,_outarray(1) AS INTEGER)
'
- varshney_sp
- Newbie
- Posts:3
- Joined:Mon May 03, 2004 3:07 am
- Location:India
Re: PROBLEM WITH 'CALL ABSOLUTE'
::)Hello Dr_D
:DThanks for your response.
:-[ I tried what you said but the result is same, what to do now? Please tell me.
:DThanks for your response.
:-[ I tried what you said but the result is same, what to do now? Please tell me.
Sandy
Re: PROBLEM WITH 'CALL ABSOLUTE'
Can you post one of the lines that your using CALL ABSOLUTE on? Maybe it's just a simple syntax error...
One more thing...
Are you compiling from the command line or the IDE?
If your compiling from the IDE, will the program run without compiling?
One more thing...
Are you compiling from the command line or the IDE?
If your compiling from the IDE, will the program run without compiling?
The file works, but the forums added to each of the lines, which is HTML for a user-defined space. Get rid of all those and follow his instructions. It should run correctly from there.
Code: Select all
&nsbp;