You are currently offline, waiting for your internet to reconnect

Which Basic Versions Can CALL C, FORTRAN, Pascal, MASM

This article was previously published under Q35965
This article has been archived. It is offered "as is" and will no longer be updated.
Certain versions of Microsoft QuickBasic and Microsoft Basic Compilercan CALL routines from certain other Microsoft languages (and passparameters), depending upon the product version number (as explainedbelow).
Microsoft Basic Professional Development System (PDS) version 7.1 canbe linked with Microsoft C PDS version 6.0 or QuickC version 2.5 or2.51.

The following application note, which can be requested from MicrosoftTechnical Support, is required if you want to perform Basicversion 7.1 mixed-language programming with C version 5.1, FORTRANversion 5.0, or Pascal version 4.0:
"How to Link Basic PDS 7.10 with C 5.10, FORTRAN 5.00, or Pascal 4.00" (application note number BB0345)
QuickBasic 4.5 and Basic PDS 7.0 (but not earlier versions) can create.OBJ modules that can be linked with .OBJ modules from MicrosoftFORTRAN version 5.0 and Microsoft QuickC versions 2.0 or 2.01.

QuickBasic versions 4.0b and 4.5, Microsoft Basic Compiler versions6.0 and 6.0b for MS-DOS and MS OS/2, and Microsoft Basic PDS version7.0 for MS-DOS and MS OS/2 create .OBJ modules that can be linked with.OBJ modules from the following languages:

  1. Microsoft Pascal version 4.0.
  2. Microsoft FORTRAN version 4.1.
  3. Microsoft C version 5.1 and QuickC versions 1.01, 2.0, and 2.01.
  4. Microsoft Macro Assembler (MASM) version 5.0 or later recommended, but earlier versions should also work.
For more information on interlanguage CALLing between Microsoft C andBasic, query in on the word BAS2C.

For more information on interlanguage CALLing between Microsoft MASMand Basic, query on the word BAS2MASM.

For more information about using the CALL statement to pass parametersfrom Basic to other languages, query on the following words:
CALL and (PASSING or PASS) and (language name)

QuickBasic 4.0

QuickBasic version 4.0 creates .OBJ modules that can be linked with.OBJ modules from the following languages (Microsoft has performedsuccessful interlanguage test suites for QuickBasic version 4.0 withthese language versions):

  1. Microsoft C version 5.00, QuickC version 1.0.
  2. Microsoft FORTRAN version 4.0.
  3. Microsoft Pascal version 4.0.
  4. Microsoft Macro Assembler (MASM) versions 4.0 and later recommended, but earlier versions should also work.
Note that QuickBasic version 4.0b might link with these earlierlanguage versions, but Microsoft cannot guarantee success because the4.0b test suites were performed only on the later language versionsmentioned further above in this article.

QuickBasic 1.x, 2.x, 3.0

In QuickBasic versions 1.0, 1.01, 1.02, 2.0, 2.01, and 3.0, you canlink only to .OBJ modules from Microsoft Macro Assembler (versions1.2x, 2.x, or later) or the given version of QuickBasic. In otherwords, QuickBasic versions 3.0 and earlier can CALL only QuickBasicsubprograms or assembly routines.

Important Information About Interlanguage CALLing

To be compatible with compiled Basic, programs should be assembled orcompiled using the medium, large, or huge memory model, and Basic mustbe linked first (as the main module).

When you link compiled Basic to other compiled Basic modules, compilerversions should not be mixed. For example, an .OBJ module compiled inQuickBasic version 4.0 should not be linked with an .OBJ modulecompiled in QuickBasic version 4.0b or 4.5 or Microsoft Basic Compilerversion 6.0 or 6.0b or Microsoft Basic PDS version 7.0 or 7.1.

As an alternative to the CALL statement for interlanguage invocation,you may use the SHELL statement to invoke most (non-TSR) .EXE, .COM,or .BAT programs that you can also invoke from DOS. SHELL worksdifferently than CALL. SHELL invokes another copy of the DOSCOMMAND.COM command processor before running a requested executableprogram.

QuickC Version Numbers

Any compatibility issues for QuickC version 2.5 also apply to version2.51. Any compatibility issues for QuickC version 2.0 also apply toversion 2.01.

Note that "Microsoft QuickC version 2.5" and "Microsoft QuickC withQuickAssembler version 2.51" are two separate products.

Shorthand references to "QuickAssembler" or "QuickC" version 2.51 (or2.01) actually refer to the official product name "Microsoft QuickCwith QuickAssembler version 2.51 (or 2.01)."

The only difference between QuickC 2.5 and 2.51 is the addition of aQuickAssembler, to create and assemble stand-alone assembly programs.The QuickC portion of the 2.51 product is exactly the same as inQuickC 2.5. (Also, the QuickC portion of the 2.01 product is exactlythe same as in QuickC 2.0.) Thus, QuickC is optionally availablewithout the QuickAssembler, but the QuickAssembler is only availablebundled with the "QuickC with QuickAssembler" product.
QuickBas BasicCom 7.10 6.00 5.10 5.00 3.00 2.50 2.00 1.00

Article ID: 35965 - Last Review: 02/27/2014 20:59:07 - Revision: 1.2

  • kbnosurvey kbarchive KB35965