BBS: Inland Empire Archive Date: 01-17-93 (10:25) Number: 354 From: DICK DENNISON Refer#: NONE To: STEVE PERRY Recvd: NO Subj: Re: int 21 1c Conf: (2) Quik_Bas
SP> Thanks for the reply, but I'm still kind of new at this. Could you SP> supply a little code for accessing the media control byte and testing SP> it. Thanks 'Not sure if this is what we were talking about, but: '$INCLUDE: 'qb.bi' DEFINT A-Z 'Dick Dennison 1/93 1:272/34 PD DIM regs AS regtypex 'Does not test for open floppy door regs.ax = &H1C00 'ah=1c al=00 regs.dx = 0 '0=default, 1=a:,2=b:,etc CALL interruptx(&H21, regs, regs) 'use dos DEF SEG = regs.ds 'change to returned segment MediaByte = PEEK(regs.bx) 'Get the byte DEF SEG 'get back to basic's segment IF (regs.ax AND 255) <> &HFF THEN SELECT CASE HEX$(MediaByte) CASE "F0" MediaType$ = "3.5 inch DS, 18 sectors or other" CASE "F8" MediaType$ = "Fixed Disk" CASE "F9" MediaType$ = "5.25 in DS, 15 sects or 3.5 in DS, 9 sects" CASE "FC" MediaType$ = "5.25 inch SS, 9 sectors" CASE "FD" MediaType$ = "5.25 inch DS, 9 sectors" CASE "FE" MediaType$ = "5.25 inch SS, 8 sectors" CASE "FF" MediaType$ = "5.25 inch DS, 8 sectors" CASE ELSE MediaType$ = "Unknown Type" END SELECT PRINT "Media ID Byte : "; HEX$(MediaByte); " = "; MediaType$ ELSE PRINT "Error encountered (invalid drive or critical error)" END IF END --- 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