home *** CD-ROM | disk | FTP | other *** search
- * EQUIP.PRG -- Read the BIOS equipment byte in low memory by calling
- * BIOS equipment service Interrupt 11h
- * NOTE: Instead of calling int86(), we could have said
- * ? peek(0, x2d("410"))
- * which obtains the same information by reading the BIOS data area.
-
- CLEAR
- SET TALK OFF
- SET ESCAPE OFF
-
- * Load the right library
- foxid = VERS()
- IF "2.0" $ foxid
- SET LIBR TO ctf && Identified FoxPro 2.0
- ELSE
- IF "2.5" $ VERS()
- IF "Windows" $ foxid && Identified FoxPro 2.5 for Windows
- SET LIBR TO ctfw
- ELSE
- SET LIBR TO ctf25 && Identified FoxPro 2.5 for DOS
- ENDIF
- ENDIF
- ENDIF
-
-
- PUBLIC ax, bx, cx, dx, si, di, cflag
-
- ret =int86(x2d("11"), @ax, @bx, @cx, @dx, @si, @di, @cflag)
-
- @00, 00 SAY "Value of equipment list " + d2x(ret) + "h"
- ** Bit 0 **
- IF and(ax, 1) == 1
- @01, 00 SAY "Diskette drives present"
- ELSE
- @01, 00 SAY "No diskette drives present"
- ENDIF
- ** Bit 1 **
- IF and(ax, 2) == 2
- @02, 00 SAY "Math coprocessor installed"
- ELSE
- @02, 00 SAY "No Math coprocessor installed"
- ENDIF
-
- ** Bits 2&3: System Board RAM **
- ret = and(shr(ax, 2), 3)
- @03, 00 SAY "System board RAM bits= " + STR(ret)
-
- ** Bits 4&5: System Video **
- ret = and(shr(ax, 4), 3)
- IF ret == 2
- @04, 00 SAY "80-column color installed"
- ELSE
- IF ret == 3
- @04, 00 SAY "Monochrome video installed"
- ENDIF
- ENDIF
-
- ** Bits 6&7: Number of Diskette Drives **
- ret = and(shr(ax, 6), 3)
- IF ret == 0
- @05, 00 SAY "One diskette drive installed"
- ELSE
- @05, 00 SAY "Number of Diskette Drives= " + STR(ret)
- ENDIF
-
- ** Bit 8: DMA chip installed"
- ret = and(ax, x2d("80"))
- IF ret != 0
- @06, 00 SAY "DMA not installed"
- ELSE
- @06, 00 SAY "DMA chip installed"
- ENDIF
-
- ** Bits 9, 10 & 11: Number of Serial Ports Installed
- ret = shr(ax, 9)
- IF and(ret, 1) == 1
- @07, 00 SAY "Serial port 1 installed"
- ENDIF
- IF and(ret, 2) == 2
- @08, 00 SAY "Serial port 2 installed"
- ENDIF
- IF and(ret, 4) == 4
- @09, 00 SAY "Serial port 3 installed"
- ENDIF
-
- ** Bits 14, 15: Number of Printers Installed
- ret = shr(ax, 14)
- @10, 00 SAY "Number of Parallel Printers Installed=" + STR(ret)
- =INKEY(0)
-
-