BBS: Inland Empire Archive Date: 06-20-92 (03:40) Number: 960 From: BOB PERKINS Refer#: NONE To: PHIL HODGES Recvd: NO Subj: Re: Interrupts Conf: (2) Quik_Bas
PH> Yes, I've since then discovered that and much more. NOW, I don't PH> know how to figure, say bit 1 of AX, or bit 2, as with INT 11 -- PH> INT 11 - EQUIPMENT DETERMINATION PH> Return: AX = "equipment flag" bits PH> 0 diskette installed PH> 1 8087 present PH> 2,3 always = 11 PH> 4,5 initial video mode PH> 01 = 40x25 COLOR PH> 10 = 80x25 COLOR PH> 11 = 80X25 IBM monochrome PH> 6,7 number of diskette drives (only if bit 0 = 1) PH> 00 = 1, 01 = 2 PH> (etc) PH> Any advice here, Bob? I tried to over-simplify what I'm doing below. Hope it is clear enough (IOW I hope I didn't muddy things up doing it that way). I have no doubt you'll be on your way in no time. :-) '$INCLUDE: 'qb.bi' DIM regs AS RegType 'Bit values for AL (above) ' Bit 7 6 5 4 3 2 1 0 ' Value 128 64 32 16 8 4 2 1 interrupt &H11, regs, regs floppy% = regs.ax AND 1 'value of bit 0 mathco% = regs.ax AND 2 'value of bit 1 videomode% = regs.ax AND 48 'value of bits 4 and 5 numdrives% = regs.ax AND 192 'value of bits 6 and 7 CLS IF floppy% THEN IF numdrives% = 0 THEN PRINT "1"; 'bit pattern is 0,0 IF numdrives% = 64 THEN PRINT "2"; 'bit pattern is 0,1 PRINT " floppy drives installed." END IF IF mathco% THEN PRINT "Math Co-processor installed." PRINT "Initial video mode: "; SELECT CASE videomode% CASE 16: PRINT "40x25 Color" 'bit pattern is 0,1 CASE 32: PRINT "80x25 Color" 'bit pattern is 1,0 CASE 48: PRINT "80x25 Mono" 'bit pattern is 1,1 END SELECT --- Msg V4.5 * Origin: Reciprocity Failure (1:124/4115.236)
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