Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - equipment() return bios equipment list http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 equipment()         Return BIOS equipment list
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   proc equipment extern
   param logical lDiskette, ;
         logical lCoprocessor, ;
         uint    uMemory, ;
         logical lMouse, ;
         uint    uVideoMode, ;
         uint    uDrives, ;
         logical lDMA, ;
         uint    uRS232, ;
         logical lGame, ;
         uint    uPrinters

 Arguments
   lDiskette indicates if diskettes are installed.

   lCoprocessor indicates if a math coprocessor is present.

   uMemory is the number of 16k chips for a PC and 64k chips
   for an XT. The value is always 4 for an AT. Do not use this value to
   determine the amount of memory installed.

   lMouse indicates if a mouse is installed.

   uVideoMode is the initial video mode (1 for 40x25 color, 2 for
   80x25 color, and 3 for 80x25 monochrome).

   uDrives is the number of diskette drives installed, not
   including hard drives. The value is correct only if the lDiskette
   parameter has a .t. value.

   lDMA indicates if DMA is present.

   uRS232 is the number of serial ports.

   lGame indicates if a game port is present.

   uPrinters is the number of printers.

 Return
   None.

 Description
   The equipment() procedure produces an equipment list from the
   computer's BIOS data. This list is maintained by BIOS and is initialized
   during the power-up tests. The parameters to the procedure are filled
   up with respective values and can be analyzed after return.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   proc Test_equipment
   vardef
      logical lDiskette, lCoproc, lMouse, lGamePort, lDMA
      uint    uMem, uVideoMode, uDrives, uRS232, uPrinters
   enddef
   equipment( lDiskette, lCoproc, uMem, lMouse, uVideoMode, ;
      uDrives, lDMA, uRS232, lGamePort, uPrinters )
   
   // print out the equipment list
   ? "Disk:":12,        lDiskette
   ? "Coprocessor:":12, lCoproc
   ? "Memory:":12,      istr( uMem )
   ? "Mouse:":12,       lMouse
   ? "Video:":12,       istr( uVideoMode )
   ? "Drives:":12,      istr( uDrives )
   ? "DMA:":12,         lDMA
   ? "RS232:":12,       istr( uRS232 )
   ? "Game:":12,        lGamePort
   ? "Printers:":12,    istr( uPrinters )
   
   // figure out the 1st drive letter for a hard disk
   if lDiskette
      if uDrives == 1
         uDrives++               // account for drive B:
      endif
      ?
      ? "1st hard disk is drive", chr( uDrives + 'A' )
   endif
   endproc

   proc main
   Test_equipment()
   endproc

See Also: driveinfo()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson