BBS: Inland Empire Archive
Date: 06-25-92 (18:34)             Number: 1501
From: ZACK JONES                   Refer#: NONE
  To: JIM TANNER                    Recvd: NO  
Subj: Interrupts                     Conf: (2) Quik_Bas
 >         It appears that "mathco%" is a FUNCTION and the
 > statement calls it and if it's TRUE  it then prints "Math
 > Copprocessor installed."

That's what it's doing - here's the complete routine for
your review - Credit of course goes to Bob Perkins.
'By: Bob Perkins
  '$INCLUDE: ''
  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% = AND 1        'value of bit 0
  mathco% = AND 2        'value of bit 1
  videomode% = AND 48    'value of bits 4 and 5
  numdrives% = AND 192   'value of bits 6 and 7

    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

Take Care,
Zack Jones

 * Origin: Zack's Shack - San Antonio TX (1:387/905.1)
Outer Court
Echo Basic Postings

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