Microsoft KB Archive/43568

= Program That Returns the Address of an Interrupt Vector =

Article ID: 43568

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 3.0
 * 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 Q43568



SUMMARY
The QuickBasic program below will return the address of the interrupt vector whose number you input. This program operates correctly with Microsoft QuickBasic Versions 3.00, 4.00, 4.00b, and 4.50, the Microsoft Basic compiler Versions 6.00 and 6.00b, and the Microsoft Basic PDS Version 7.00.



MORE INFORMATION
'Program GETVECTR.BAS looks in low memory to get the address of 'any interrupt vector that you input.

'Program GETVECTR.BAS looks in low memory to get the address of 'any interrupt vector that you input.

DEFINT A-Z DEF SEG = 0 CLS VIEW PRINT 25 TO 25 COLOR 15, 1 PRINT LOCATE 25, 30 PRINT &quot;Ctrl-Break to EXIT&quot;; VIEW PRINT 1 TO 1 PRINT LOCATE 1, 34 PRINT &quot;GETVECTOR&quot;;

VIEW PRINT 9 TO 15 COLOR 0, 7 PRINT : PRINT : PRINT : PRINT : PRINT : PRINT : PRINT

DO PRINT &quot; Enter the Number of the Interrupt. Use &H to specify a &quot; PRINT &quot; Hex Number (such as &H5 for Interrupt 5 Hex)&quot; PRINT INPUT &quot; Interrupt &quot;, intnum offset = 4 * intnum byte1$ = HEX$(PEEK(offset)) byte2$ = HEX$(PEEK(offset + 1)) byte3$ = HEX$(PEEK(offset + 2)) byte4$ = HEX$(PEEK(offset + 3)) vector$ = byte4$ + &quot; &quot; + byte3$ + &quot; : &quot; + byte2$ + &quot; &quot; + byte1$ LOCATE 13, 1 PRINT SPACE$(40) LOCATE 13, 1 PRINT &quot;Handler for Interrupt     &quot;; HEX$(intnum) + &quot; Hex&quot; PRINT &quot;is located at address --> &quot;; vector$ PRINT LOOP DEF SEG CLS

Additional query words: QuickBas BasicCom

Keywords: KB43568

-

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

© Microsoft Corporation. All rights reserved.