BBS: Inland Empire Archive Date: 03-25-93 (11:32) Number: 333 From: DIK COATES Refer#: NONE To: ROBERT CHURCH Recvd: NO Subj: Disk not ready, and gene Conf: (2) Quik_Bas
>>>> QUOTING Robert Church to All <<<< RC> isn't there the system locks up! I don't wan't to use error trapping I don't know how you can do it in BASIC... but the routine I use with my asm based basic library does the following... .Code oldint dw ? ;variable stashed in CS buff80 db 80 dup(?) ;80 byte buffer for strings DisableInt MACRO mov ax, 3524h ;DOS get int 24h vector int 21h mov ax, es:[bx] mov cs:oldint, ax mov byte ptr es:[bx], 00CFh ;replace it with IRET call endm EnableInt MACRO push ax push bx push es mov ax, 3524h ;DOS get int 24h vector int 21h mov ax, cs:oldint mov es:[bx], ax ;restore old value pop es pop bx pop ax endm . . . The macros work basically as follows... Int 24h is the critical error handler address... and calling Int 35h gets the interrupt vector... The old value for the interrupt vector is saved to 'oldint' and a new value is put in place... 00CFh... this is the machine code for and Interrupt Return. When a critical hardware error is encountered the call goes out to int24 and is immediately returned to the program that had the error... in addition, and software critical error code is generally returned as part of the failed call... The code I use between DisableInt and EnableInt is ASM stuff... and I'm not sure if the above macros can be converted to calls in a library... (I don't see why they can't) For as long as the interrupt is redirected, there is no critical hardware error capability... and it should be enabled ASAP... Hope this helps, and doesn't really confuse you... Maybe Casey can add a couple of comments... Regards Dik ... Replied Cleopatra unto Caesar: Vidi. Teenie Weenie Venit. -DM ___ Blue Wave/QWK v2.10 --- Maximus 2.01wb * Origin: Durham Systems (ONLINE!) (1:229/110)
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