BBS: Inland Empire Archive Date: 03-25-93 (07:49) Number: 324 From: DICK DENNISON Refer#: NONE To: ROBERT CHURCH Recvd: NO Subj: Re: Disk Not Ready, and G Conf: (2) Quik_Bas
RC> How can I detect these before they happen? Here's the scenario. RC> I call FindFirst. Remember this is on a floppy drive. If the disk is RC> there the system locks up! I don't wan't to use error trapping if I c RC> help it. What can I do? BTW, the FindFirst routine sets an error fla RC> an error occured (DOSError%). Use Int 13 first ala: '$INCLUDE: 'qb.bi' 'Dick Dennison 1:272/34 'Check for floppy drive door open DIM regs AS RegType '3/93 Public Domain regs.ax = &H201 'Int 13 Ser 2 Read sector 'ah=2 al=1(sector to read) regs.dx = 1 '0=a:, 1=b: INTERRUPT &H13, regs, regs 'Call int 13 PRINT regs.flags AND 1 'If carry flag is set then 'there was an error (probably no disk) PRINT HEX$(regs.ax AND 255) 'error code is in AL --- VP [DOS] V4.09e * Origin: The MailMan (914)374-3903 NY Quick Share Pt #7 *HST (1:272/34)
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