Microsoft KB Archive/45170

= Using CALL INTERRUPT to Return DOS Version Number =

Article ID: 45170

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Compiler 6.0
 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Professional Development System 7.0

-



This article was previously published under Q45170



SUMMARY
The program shown below demonstrates how to use CALL INTERRUPT to return the DOS version number.

This information applies to Microsoft QuickBasic Versions 4.00, 4.00b, and 4.50 and to the Microsoft Basic Compiler Versions 6.00, and 6.00b for MS-DOS, and to Microsoft Basic PDS Version 7.00 for MS-DOS.

The following program is INTVER.BAS: ' $INCLUDE: 'qb.bi' ' For BC.EXE and QBX.EXE in Basic 7.00 the include is 'QBX.BI'

DIM inregs AS RegType, outregs AS RegType inregs.ax = &H3000 CALL INTERRUPT(&H21, inregs, outregs) majorver = outregs.ax AND &HFF minorver = (outregs.ax AND &HFF00) / 256 PRINT &quot;MS-DOS Version: &quot;; majorver; &quot;.&quot;; minorver

Additional query words: QuickBas BasicCom

Keywords: KB45170

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.