home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / q / qlib56.zip / SYSTEM.DOC < prev    next >
Text File  |  1992-12-05  |  19KB  |  595 lines

  1.      QLIB's SYSTEM routines detect the presence or status of PC hardware
  2.      or software.  Monitor type, co-processor presence, CPU speed and keyboard
  3.      toggles may be determined, CPU speed toggle and keyboard toggles may be
  4.      set.  CTRL, ALT and SHIFT key status may also be monitored, and the
  5.      software enviornment may be determined.
  6.  
  7.  
  8.  
  9.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  10.  
  11.      Subroutines: CapsOFF, CapsON
  12.      object file: kbd2.obj
  13.  
  14.           Simplified controls to toggle the CapsLock key.  See also
  15.      GetKBDToggle and SetKBDToggle.
  16.  
  17.      Example:
  18.           CALL CapsON         ' this turns Caps Lock on
  19.  
  20.  
  21.  
  22.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  23.  
  24.     Function: oops% = DOSError
  25.     object file: q$error.obj
  26.  
  27.     DOSError returns an error flag resulting from the most recent QLIB
  28.     subroutine which updates the DOS error flag (see FLoad in DISK.DOC).
  29.     NOTE: not all QLIB subroutines update DOSError!!
  30.  
  31.     common MS-DOS error codes are:
  32.  
  33.     2 = file not found
  34.     3 = path not found
  35.     4 = too many open files
  36.     5 = access denied (file may be read-only or a subdirectory
  37.                        or subdirectory not empty)
  38.     8 = insufficient memory
  39.     19= disk is write-protected
  40.  
  41.     Example:
  42.      REM $INCLUDE: '\qb4\qlib.bi'
  43.      filename$ = "\ramfont\italics.fnt"
  44.      iseg% = fload (filename$)
  45.      IF DOSError THEN
  46.          .
  47.          .
  48.          .              ; error handling code
  49.  
  50.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  51.  
  52.     Subroutine: EGAinfo(crt%, memory%)
  53.     object file: egainfo.obj
  54.  
  55.          EGAinfo determines the type of monitor and amount of memory
  56.     installed on an EGA card.  Crt% = 0 if a monochrome monitor is
  57.     attached to the EGA card, -1 if an RGB color monitor, and crt% = 1
  58.     if the monitor is an Enhanced or Mutli-scan monitor.  Memory% returns
  59.     the kbytes installed on the card.  If no EGA is installed, memory% = 0.
  60.  
  61.     Example:
  62.          CALL EGAinfo(crt%, memory%)
  63.  
  64.  
  65.  
  66.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  67.  
  68.     Function: a$ = EXEName$()
  69.     object files: exename.obj (strncpy.obj)
  70.  
  71.     requires DOS version 3.0 or later
  72.  
  73.          EXEName$ returns the full drive and path name of the currently
  74.     executing program.  When developing programs within the QB or QBX
  75.     development enviornment, EXEName$ returns something like:
  76.  
  77.     C:\QB4\QB.EXE
  78.  
  79.     Example:
  80.     REM $INCLUDE: 'qb4\lib\qlib.bi'
  81.     PRINT EXEName$                   ' prints name of program
  82.  
  83.  
  84.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  85.  
  86.     Subroutine: FindMONO(crt%)
  87.     object files: findmono.obj (find6845.obj, egainfo.obj, q$herc.obj)
  88.  
  89.          FindMONO determines if a monochrome monitor is installed.
  90.     GetCRT (below) determines the default monitor; FindMONO will
  91.     find an MDA or HGC monitor in single- or dual-monitor setups
  92.     whether the monochrome monitor is default or not.  Crt% = 0 if
  93.     MDA, 128 or greater if HGC or compatible, and -1 if no monochrome
  94.     installed.
  95.  
  96.     Example:
  97.          CALL FindMONO(crt%)
  98.  
  99.  
  100.  
  101.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  102.  
  103.     Function: Floppies
  104.     object file: floppies.obj
  105.  
  106.          FLOPPIES determines the number of floppy drives installed in the
  107.     computer.
  108.  
  109.     Example:
  110.          REM $INCLUDE: 'qlib.bi'
  111.          fdrives = floppies            ' get number of floppy drives
  112.  
  113.  
  114.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  115.  
  116.     Function: FloppyType(d%)
  117.     object file: floptype.obj
  118.  
  119.          Determines the type of floppy disk drive installed.  Drive number
  120.     d% is the BIOS drive number corresponding to the physical drives
  121.     installed:  for drive A, d% = 0, and for drive B, d% = 1.
  122.  
  123.     Returns:   0 if drive not installed
  124.                1 if drive is 360 k
  125.                2 if drive is 1.2 M
  126.                3 if drive is 720 k
  127.                4 if drive is 1.44M
  128.     Example:
  129.          REM $INCLUDE: 'qlib.bi'
  130.          ' drive a:
  131.          d% = 0
  132.          drivetype = FloppyType(d%)
  133.  
  134.  
  135.  
  136.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  137.  
  138.     Function: GetCMD$(a%)
  139.     object files: getcmd.obj (strndup.obj)
  140.  
  141.          GetCMD$ isolates and returns command-line parameters without
  142.     converting the parameter to upper case.  GetCMD$ acts like an array
  143.     of strings; GetCMD$(0) returns the first parameter, while GetCMD$(n%)
  144.     returns the (n+1)th parameter.  GetCMD$ returns a NUL string if there
  145.     are no more parameters.
  146.  
  147.     Note: in the QuickBASIC development enviornment, GetCMD returns QB's
  148.     parameters (including /L and QLIB), while when your program is run
  149.     from the command line, GetCMD$ returns your program's parameters.
  150.  
  151.     Example:
  152.         REM $INCLUDE: 'qlib.bi'
  153.         ' print command line parameters, starting with the first one
  154.         a% = 0
  155.  
  156. 10:     c$ = GetCMD$(a%)
  157.         IF c$ <> "" THEN PRINT c$: GO TO 10
  158.  
  159.  
  160.  
  161.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  162.  
  163.     Subroutine: GetCPU(cpu%)
  164.     object file: getcpu.obj
  165.  
  166.          Determines the processor in the computer system.  Returns cpu% = 0
  167.     if 8086 or 8088, cpu% = 1 if 80186 or 80188, cpu% = 2 if 286, cpu% = 3
  168.     if 386 or 386sx, and cpu% = 4 if 486.
  169.  
  170.     Example:
  171.          DIM cpu$(4)
  172.          FOR i = 0 to 4: READ cpu$(i): NEXT i
  173.          DATA "8086 or 8088","80186 or 80188","286","386","486"
  174.          CALL GetCPU(cpu%)
  175.          PRINT cpu$(cpu%)
  176.  
  177.  
  178.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  179.  
  180.     Subroutine: GetCRT(crt%)
  181.     object files: getcrt.obj (q$herc.obj, egainfo.obj)
  182.  
  183.          GetCRT tells you what kind of display is being used.  The returned
  184.     value will be zero if it's MDA or EGA with a monochrome monitor, -1 if
  185.     CGA, 1 if EGA with a color or enhanced color monitor, 2 if MCGA, and if
  186.     VGA, crt% will be 3.  With Hercules or Hercules clones, crt% will be 128
  187.     or greater.  The Hercules Graphics Card Plus returns 144, and the 
  188.     Hercules InColor card returns 208.  See also IsSEVGA, EGAinfo, and
  189.     FindMONO.
  190.  
  191.     Example:
  192.          REM $INCLUDE: 'qlib.bi'
  193.          CALL GetCRT(crt%)
  194.          SELECT CASE crt%
  195.               CASE -1
  196.                    PRINT "CGA Color"
  197.               CASE 0
  198.                    PRINT "Monochrome Display Adapter"
  199.               CASE 1
  200.                    PRINT "EGA"
  201.               CASE 2
  202.                    PRINT "MCGA"
  203.               CASE 3
  204.                    PRINT "VGA"
  205.               CASE 128 TO 208
  206.                    PRINT "Hercules"
  207.          END SELECT
  208.  
  209.  
  210.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  211.  
  212.     Subroutine: GetDOSVer(maj%, min%)
  213.     object file: dosver.obj
  214.  
  215.          GetDOSVer returns the major and minor version numbers of the DOS
  216.     installed.  Maj% is the major version number, i.e., maj% = 3 if DOS 3.xx
  217.     is installed.  Min% is the minor version number, i.e., min% = 21 if DOS
  218.     x.21 is installed.
  219.  
  220.     Example:
  221.      CALL GetDOSVer(maj%,min%)
  222.      REM if maj% < 3 then SHELL may not be reliable
  223.  
  224.  
  225.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  226.  
  227.     Subroutine: GetKBDToggle(kbd%)
  228.     object file: kbd.obj
  229.  
  230.          Returns the status of the keyboard toggles and whether the CTRL, ALT
  231.     or SHIFT keys are pressed.  The code returned by GetKBDToggle is a copy of
  232.     the BIOS keyboard status byte, which must be ANDed to determine which key
  233.     toggles are set.  See also SetKBDToggle.
  234.  
  235.     Example:
  236.          rshift% = 1
  237.          lshift% = 2
  238.          shiftkey% = 3
  239.          ctrl% = 4
  240.          alt% = 8
  241.          scroll% = 16
  242.          numb% = 32
  243.          caps% = 64
  244.          insert% = 128
  245.          
  246.          CALL GetKBDToggle(kbd%)
  247.          IF (kbd% AND rshift%) THEN PRINT "Right Shift pressed"
  248.          IF (kbd% AND lshift%) THEN PRINT "Left Shift pressed"
  249.          IF (kbd% AND shiftkey%) THEN PRINT "Shift Key pressed"
  250.          IF (kbd% AND ctrl%) THEN PRINT "Ctrl Key pressed"
  251.          IF (kbd% AND alt%) THEN PRINT "Alt Key pressed"
  252.          IF (kbd% AND scroll%) THEN PRINT "ScrollLOCK ON"
  253.          IF (kbd% AND numb%) THEN PRINT "NumLOCK ON"
  254.          IF (kbd% AND caps%) THEN PRINT "CapsLOCK ON"
  255.          IF (kbd% AND insert%) THEN PRINT "INSERT ON"
  256.  
  257.  
  258.  
  259.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  260.  
  261.     Subroutine: GetSpeed(speed%)
  262.     object file: speed.obj
  263.  
  264.          Determines whether the system is in "turbo" mode.  Returns 0 if
  265.     CPU is operating at normal speed, 1 if operating at faster CPU speed.
  266.     See also SetSpeed.
  267.  
  268.     Example:
  269.          CALL GetSpeed(speed%)
  270.  
  271.  
  272.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  273.  
  274.      Function: IsATT
  275.      object files: isatt.obj ($6845.obj, egainfo.obj)
  276.  
  277.      IsATT determines if the program is running on an ATT 6300 or similar
  278.      computer (such as Olivetti).  If a Hercules is also installed in
  279.      the computer it may be switched to HALF mode (see Use32k, Use64k in
  280.      GRAPHICS.DOC).
  281.  
  282.      Example:
  283.           REM $INCLUDE: 'qlib.bi'
  284.           REM  look for ATT 6300 so I can use graph mode &H40
  285.           REM  which is twice the resolution of CGA 2-color mode
  286.  
  287.           modenumber% = 6                   ' assume CGA
  288.           IF IsATT THEN modenumber% = &H40
  289.           CALL ScreenMode(modenumber%)      ' see GRAPHICS.DOC
  290.  
  291.  
  292.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  293.  
  294.      Function: IsMSHERC
  295.      object file: ismsherc.obj
  296.  
  297.      IsMSHERC determines if the MSHERC.COM resident Hercules driver
  298.      has been installed.  (MSHERC.COM is called QBHERC.COM in early
  299.      versions of QB 4.x).  MSHERC.COM is required to use BASIC's
  300.      SCREEN 3 function.  MSHERC is not required for QLIB's Hercules
  301.      graphics subroutines.
  302.  
  303.      IsMSHERC returns 0 if MSHERC has not been loaded, or returns -1
  304.      if MSHERC has been loaded.
  305.  
  306.      Example:
  307.          REM $INCLUDE: 'qlib.bi'
  308.          IF IsMSHERC THEN ...     ' use either QLIB or BASIC Hercules stuff
  309.  
  310.             
  311.  
  312.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  313.  
  314.      Function: IsSEVGA
  315.      object file: issevga.obj
  316.  
  317.           IsSEVGA determines if a Super EGA or Super VGA graphics
  318.      card is installed.  Systems detected are:
  319.  
  320.      Everex Micro Enhancer EGA
  321.      Paradise EGA 480
  322.      Oak VGA
  323.      Paradise Plus 16 VGA
  324.      Tseng VGA
  325.      Western Digital VGA
  326.  
  327.      Note that IsSEVGA does not determine what kind of monitor is
  328.      connected to the card.  Many Super EGA/VGA cards require a
  329.      multi-frequency monitor to take advantage of the card's extended
  330.      capabilities.
  331.  
  332.      IsSEVGA returns 0 if no supported system is detected.  If a
  333.      Super EGA/VGA is detected, IsSEVGA returns:
  334.  
  335.      Super EGA:    256+1 if Paradise EGA 480
  336.                    256+2 if Everex Micro Enhancer
  337.  
  338.      Super VGA:    768+1 if Paradise Plus 16
  339.                    768+3 if Tseng VGA
  340.                    768+4 if Oak VGA
  341.                    768+5 if Western Digital VGA
  342.  
  343.      Example:
  344.           REM $INCLUDE: 'qlib.bi'
  345.           evga% = IsSEVGA
  346.           if evga% THEN ...  'ask user if he/she has a multi-frequency
  347.                              ' monitor attached to the computer
  348.  
  349.  
  350.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  351.  
  352.      Subroutines: InsertOFF, InsertON
  353.      object file: kbd2.obj
  354.  
  355.           Simplified controls to toggle the Insert key.  See also
  356.      GetKBDToggle and SetKBDToggle.
  357.  
  358.      Example:
  359.           CALL InsertON       ' this turns Insert key on
  360.  
  361.  
  362.  
  363.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  364.  
  365.     Function: KBDType
  366.     object file: kbd1.obj
  367.  
  368.         Detects enhanced (101-key) keyboards.  Returns 1 if 101-key
  369.     keyboard present and supported, 0 if not.  NOTE: KBDType returns 1
  370.     only if the enhanced keyboard is present AND is supported by the
  371.     computer's BIOS.
  372.  
  373.     Example:
  374.          REM $INCLUDE: 'qlib.bi'
  375.          IF KBDType THEN PRINT "Enhanced keyboard attached to system"
  376.  
  377.  
  378.  
  379.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  380.  
  381.      Subroutine: KeyRate(delay%, repeat%)
  382.      object file: keyrate.obj
  383.  
  384.           KeyRate changes the keyboard's "typematic" delay and repeat rate
  385.      on PS/2 and most AT computers.  Delay% (0 - 3) sets the delay time for
  386.      the start of the typematic action.  Repeat% (0 - 31) sets the number
  387.      of repeats per second.  For both delay% and repeat%, 0 gives the fastest
  388.      keyboard action, and the maximum value (delay% = 3, repeat% = 31) gives
  389.      you an unbearably slow keyboard.
  390.  
  391.      Example:
  392.           REM  don't slow me down!!
  393.           delay% = 0: repeat% = 0
  394.           CALL KeyRate(delay%, repeat%)
  395.  
  396.  
  397.  
  398.  
  399.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  400.  
  401.     Function: a% = MathChip
  402.     object file: mathchip.obj
  403.  
  404.          Detects the presence of a math coprocessor in the system.
  405.     Value returned = 0 if not installed, 1 if 8087, 2 if 80287, 3 if 80387.
  406.     DECLARE FUNCTION MathChip%() before using MathChip.  The INCLUDE
  407.     file QLIB.BI does this for you.
  408.  
  409.     Thanks to Marty Borgen for his help debugging MathChip on PS/2 computers.
  410.  
  411.     Example:
  412.          REM $INCLUDE: 'qlib.bi'
  413.          msg$ = "No math coprocessor"
  414.          IF MathChip THEN msg$ = "math coprocessor installed"
  415.          PRINT msg$
  416.  
  417.  
  418.  
  419.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  420.  
  421.     Subroutine: MouseLimit(x0%, y0%, x1%, y1%)
  422.     object file: mouse.obj
  423.  
  424.          MouseLimit confines the mouse's motion to an area limited by
  425.     x0, y0, x1, y1.  Note that the x-dimension is horizontal and the
  426.     y-dimension is vertical, and that both x and y are PIXELS, whether
  427.     the video system is in graphics mode or text mode.
  428.  
  429.     Example:
  430.          REM  keep the mouse out of the right side of the screen
  431.          REM  assume SCREEN 12, 640 x 480 graphics
  432.          x0% = 0: y0% = 0
  433.          x1% = 600: y1% = 479
  434.          CALL MouseLimit(x0%, y0%, x1%, y1%)
  435.  
  436.  
  437.  
  438.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  439.  
  440.     Subroutine: MousePos(x%, y%)
  441.     object file: mouse.obj
  442.  
  443.          Positions the mouse cursor at (x,y).  Note that the x-dimension
  444.     is horizontal and the y-dimension is vertical, and that both x and y
  445.     are PIXELS, whether the video system is in graphics mode or text mode.
  446.  
  447.     Example:
  448.          REM  put the mouse cursor in the upper left corner of the screen
  449.          x% = 0:y% = 0
  450.          CALL MousePos(x%, y%)
  451.  
  452.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  453.  
  454.     Function: buttons% = MouseReady
  455.     object file: mouse.obj
  456.  
  457.          MouseReady determines if the Mouse driver software is loaded,
  458.     and returns the number of mouse buttons if so.
  459.  
  460.     Example:
  461.          REM $INCLUDE: 'qlib.bi'
  462.          buttons% = MouseReady
  463.          IF buttons% THEN PRINT buttons% + " button mouse installed"
  464.  
  465.  
  466.  
  467.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  468.  
  469.     Function: a$ = Path$(n%)
  470.     object files: path.obj (strlen.obj, strncpy.obj)
  471.  
  472.     requires: DOS 3.xx or greater
  473.  
  474.     Path$() is a pseudo array which returns a path from the program's
  475.     enviornment block.  If the length of the string returned by Path$
  476.     is zero, there are no more paths in the enviornment block.
  477.  
  478.     Example:
  479.          REM  the PATH statement in my AUTOEXEC.BAT file looks like this:
  480.          REM  PATH=C:\;C:\MASM;C:\DOS;C:\F77L3;C:\OS386
  481.  
  482.          REM $INCLUDE 'qlib.bi'     ' tell BASIC about the function
  483.          a$ = " ": n% = 0           ' initial conditions for WHILE/WEND
  484.          WHILE LEN(a$) <> 0
  485.          a$ = path$(n%)
  486.          PRINT a$
  487.          n% = n% + 1
  488.          WEND
  489.  
  490.          REM  this prints:
  491.  
  492.          REM  C:\
  493.          REM  C:\MASM
  494.          REM  C:\DOS
  495.          REM  C:\F77L3
  496.          REM  C:\OS386
  497.  
  498.  
  499.  
  500.  
  501.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  502.  
  503.      Subroutines: NumOFF, NumON
  504.      object file: kbd2.obj
  505.  
  506.           Simplified controls to toggle the NumLock key.  See also
  507.      GetKBDToggle and SetKBDToggle.
  508.  
  509.      Example:
  510.           CALL NumON          ' this turns NumLock on
  511.  
  512.  
  513.  
  514.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  515.  
  516.     Function: PrinterError
  517.     object file: prnerror.obj
  518.  
  519.         Determines whether the printer is ready.  PrinterError returns 0 if
  520.     no error is detected.  If the printer is not turned on, or if it is out
  521.     of paper, PrinterError returns -1.  On some printers, -1 is returned if
  522.     the power is on but the printer is not on-line.
  523.  
  524.     Example:
  525.          REM $INCLUDE 'qlib.bi'
  526.          IF PrinterError THEN PRINT "Printer not ready or out of paper"
  527.  
  528.  
  529.  
  530.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  531.  
  532.     Subroutine: PrnScreenOFF
  533.     Subroutine: PrnScreenON
  534.     object file: prnscrn.obj
  535.  
  536.         These subroutines enable or disable the Print Screen key.
  537.  
  538.     Example:
  539.         REM  disable Print Screen
  540.         CALL PrnScreenOFF
  541.  
  542.         REM  turn it back on before ending the program
  543.         CALL PrnScreenON
  544.  
  545.  
  546.  
  547.  
  548.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  549.  
  550.      Subroutines: ScrollOFF, ScrollON
  551.      object file: kbd2.obj
  552.  
  553.           Simplified controls to toggle the Scroll Lock key.  See also
  554.      GetKBDToggle and SetKBDToggle.
  555.  
  556.      Example:
  557.           CALL ScrollON       ' this turns Scroll Lock on
  558.  
  559.  
  560.  
  561.  
  562.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  563.  
  564.     Subroutine: SetKBDToggle(kbd%)
  565.     object file: kbd.obj
  566.  
  567.          Sets the NumLOCK, CapsLOCK, ScrollLOCK and INSERT keyboard toggles.
  568.     See GetKBDToggle.
  569.  
  570.     Example:
  571.          REM  let's be sure the NumLOCK toggle is ON and CapsLOCK is off
  572.       REM  use the constants in GetKBDToggle
  573.  
  574.          CALL GetKBDToggle(kbd%)       ' get present toggles
  575.          kbd% = (kbd% OR numb%)        ' this will set NumLOCK ON
  576.          kbd% = (kbd% AND (NOT caps%)) ' clears CapsLOCK bit
  577.          CALL SetKBDToggle(kbd%)
  578.  
  579.  
  580.  
  581.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  582.  
  583.     Subroutine: SetSpeed(speed%)
  584.     object file: speed.obj
  585.  
  586.          Sets speed toggle of most "turbo" clone computers.  Speed% = 0 will
  587.     set normal CPU speed, any other value for speed% will set "turbo" speed.
  588.     Should not affect non-turbo computers (such as IBM PC, AT, etc.).  Good
  589.     style suggests that before using this function for the first time, you
  590.     should get the initial speed with GetSpeed and save it.  You should
  591.     then restore the CPU to that original state before exiting the program.
  592.  
  593.     Example:
  594.          CALL SetSpeed(speed%)
  595.