BBS: Inland Empire Archive Date: 03-11-92 (02:20) Number: 88 From: STEVE HALKO Refer#: NONE To: ALL Recvd: NO Subj: Qb hooks int vectors Conf: (2) Quik_Bas
There's been some discussion here lately about which interrupt vectors are hooked by QB programs. Since I would much rather code than sleep, I did a little research tonight. I wrote a QB program to dump the entire interrupt vector table to a file. I ran this program both in the IDE and as an EXE. I then created a 3rd file by porting the ouput of a RAM viewing utility I have. (For this utility, I know which interrupts are hooked, since I have the source.) By comparing the three resulting files, I came up with these results: Program run from the IDE hooks INTs 0, 2, 4, 9, 10, 23, 24, 34 thru 3D, 3F, EF, and F0. Program run as a stand alone EXE hooks INTs 0, 4, 24, EF, and F0. Note that there may be other interrupts that may be hooked by different programs, e.g. programs using TIMER may very well hook INT 8 (just a guess). Also, my program did not use floating point. If it did, then even the stand alone EXE would have hooked INTs 34-3D and 3F, (the floating point emulation interrupts). So it looks like using INT 21h, Function 4Ch to exit a QB program would do the most harm if you ran it from the IDE. If running it as an EXE, you would only hang the machine if another program called INT 0 (Divide by Zero), INT 4 (Overflow), or INT 24 (Critical Error). INTs EF and F0 are only used by BASIC programs to store the old values of INTs 9 and 8, respectively, so its probably not important whether they are restored or not when BASIC is through with them. * SLMR 2.1a * Got kleptomania? Take something for it. --- DB B1061/002487 * Origin: Gulf Coast BBS -QuickSHARE #2- (904)563-2547 HST/V.32bis (1:365/12)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET