FOXLIB By Sparkle Software A collection of commands for FoxPro and FoxBASE + FOXLIB Version 1.0 Copyright (C) Sparkle Software 1990 All Rights Reserved. FOXLIB is a trademark of Sparkle Software. FoxBASE + and FoxPro are registered trademarks of Fox Software Inc. DEFINITION OF SHAREWARE Shareware distribution gives users a chance to try software before buying it. If you try a Shareware program and continue using it, you are expected to register. Copyright laws apply to both Shareware and commercial software, and the copyright holder retains all rights, with a few specific exceptions as stated below. Shareware authors are accomplished programmers, just like commercial authors, and the programs are of comparable quality. (In both cases, there are good programs and bad ones). The main difference is in the method of distribution. The author specifically grants the right to copy and distribute the software, either to all and sundry or to a specific group. For example, some authors require written permission before a commercial disk vendor may copy their Shareware. Shareware is a distribution method, not a type of software. You should find software that suits your needs and pocketbook, whether it's commercial or Shareware. The Shareware system makes fitting your needs easier, because you can try before you buy. And because the overhead is low, prices are low also. Shareware has the ultimate money-back guarantee -- if you don't use the product, you don't pay for it. DISCLAIMER - AGREEMENT SPARKLE SOFTWARE PROVIDES FOXLIB "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE OR MERCHANTABILITY AND SPARKLE SOFTWARE SHALL NOT BE LIABLE FOR ANY TORT, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES SUCH AS LOSS OF PROFITS, LOSS OF GOODWILL, OR LOSS OF PRODUCTIVITY FROM THE USE OR INABILITY TO USE THE SOFTWARE FOR ANY PURPOSE. SOME STATES DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES SO THIS LANGUAGE MAY NOT APPLY TO YOU. IN SUCH CASE, SPARKLE SOFTWARE LIABILITIES SHALL BE LIMITED TO A REFUND OF THE PRODUCT'S PURCHASE PRICE. FOXLIB is a "shareware program" and is provided at no charge to the user for EVALUATION. Feel free to share it with your friends, but please do not give it away altered or as part of another system. The essence of "user-supported" software is to provide personal computer users with quality software without high prices, and yet to provide incentive for programmers to continue to develop new products. If you find this program useful and find that you are using FOXLIB and continue to use FOXLIB after 30 days, you must make a registration payment of $45 (U.S. orders only, international orders are $65) to Sparkle Software. The $45 registration fee will license one copy for use on any one computer at any one time. You must treat this software just like a book. An example is that this software may be used by any number of people and may be freely moved from one computer location to another, so long as there is no possibility of it being used at one location while it's being used at another. Just as a book cannot be read by two different persons at the same time. Commercial users of FOXLIB must register and pay for their copies of FOXLIB within 30 days of first use or their license is withdrawn. Site-License arrangements may be made by contacting Sparkle Software. Anyone distributing FOXLIB for any kind of remuneration must first contact Sparkle Software for authorization. You are encouraged to pass a copy of FOXLIB along to your friends for evaluation. Please encourage them to register their copy if they find that they can use it. ALL REGISTERED USERS WILL RECEIVE ASSEMBLY LANGUAGE SOURCE CODE FOR ALL FOXLIB COMMANDS, SAMPLE FOX PROGRAM FILES, A PRINTED MANUAL, AND A 16 PAGE TUTORIAL SHOWING YOU HOW TO CREATE A FOX COMMAND USING THE MICROSOFT MACRO ASSEMBLER AND DOS'S DEBUG! When you register FOXLIB, you may not publish the source code in any form. No amount of modification and/or rewrite of my source code will allow the consideration of the resultant source code to be your property. This is the only agreement between you and Sparkle Software. It cannot and shall not be modified unless in writing and signed both by you and an authorized officer of Sparkle Software. FOXLIB is a trademark of Sparkle Software. Microsoft, Microsoft Macro Assembler, and MS-DOS are registered trademarks of Microsoft Corporation. IBM and PS/2 are registered trademarks of International Business Machines Corporation. FoxBASE + and FoxPro are registered trademarks of Fox Software Inc. Intel is a registered trademark of Intel Corporation. CompuServe is a registered trademark of CompuServe Incorporated. Acknowledgements: Software Development Mike Fieldman Documentation Mike Fieldman I would like to say "Praise the Lord" for version 1.0 being completed. Special thanks go to my very lovely wife Nancy, Dr. Larry Stokes for giving me my first exposure to personal computers, Fox Software (Chris Williams, Lori Womack, Gloria Pfeif, Jacqueline Jaynes, David Fulton, and everyone else at Fox Software), Corey Schwartz, Dr. Jim Rassi for giving me the opportunity to teach personal computer classes, and of course, Sparky. TABLE OF CONTENTS ***** Make sure you read the "README.1ST" file before using FOXLIB ***** INTRODUCTION ........................................ Page 9-10 HARDWARE/SOFTWARE REQUIREMENTS & PACKAGE CONTENTS ... Page 11 INSTALLING FOXLIB ................................... Page 12-13 REGISTRATION & SOFTWARE SUPPORT ..................... Pages 14-15 USING FOXLIB ........................................ Pages 16-18 EXAMPLES ............................................ Page 19 IMPORTANT! .......................................... Page 20 QUICK START ......................................... Page 21 DOS COMMANDS: CREATE SUBDIRECTORY ................................. Page 23 DOS VERSION ......................................... Page 24 DRIVE READY ......................................... Page 25 GET CURRENT DRIVE ................................... Page 26 GET FILE ATTRIBUTE .................................. Page 27 GET VERIFY FLAG ..................................... Page 28 REMOVE SUBDIRECTORY ................................. Page 29 SET DIRECTORY ....................................... Page 30 SET DRIVE ........................................... Page 31 SET FILE ATTRIBUTE .................................. Page 32 SET VERIFY FLAG ..................................... Page 33 EQUIPMENT COMMANDS: BIOS DATE ........................................... Page 35 CONVENTIONAL MEMORY ................................. Page 36 EXTENDED MEMORY ..................................... Page 37 GAME ADAPTER ........................................ Page 38 MATH COPROCESSOR .................................... Page 39 MICRO CHANNEL ARCHITECTURE .......................... Page 40 NUMBER OF INSTALLED DRIVES .......................... Page 41 PC BUS .............................................. Page 42 PC TYPE PC .......................................... Page 43 PC TYPE XT .......................................... Page 44 PC TYPE AT .......................................... Page 45 PC TYPE PCjr ........................................ Page 46 PC TYPE PC/XT 286 ................................... Page 47 PC TYPE PC CONVERTIBLE .............................. Page 48 PC TYPE PS/2 MODEL 30 ............................... Page 49 PC TYPE PS/2 MODEL 50 ............................... Page 50 PC TYPE PS/2 MODEL 55 ............................... Page 51 PC TYPE PS/2 MODEL 60 ............................... Page 52 PC TYPE PS/2 MODEL 70 ............................... Page 53 PC TYPE PS/2 MODEL 80 ............................... Page 54 PARALLEL PORT ....................................... Page 55 REAL-TIME CLOCK ..................................... Page 56 SCREEN WIDTH ........................................ Page 57 SERIAL PORT ......................................... Page 58 TABLE OF CONTENTS KEYBOARD COMMANDS: CAPS LOCK KEY STATUS ................................ Page 60 INSERT KEY STATUS ................................... Page 61 LEFT SHIFT KEY STATUS ............................... Page 62 NUM LOCK KEY STATUS ................................. Page 63 RIGHT SHIFT KEY STATUS .............................. Page 64 SCROLL LOCK KEY STATUS .............................. Page 65 SET CAPS LOCK KEY OFF ............................... Page 66 SET NUM LOCK KEY OFF ................................ Page 67 SET SCROLL LOCK KEY OFF ............................. Page 68 SET CAPS LOCK KEY ON ................................ Page 69 SET NUM LOCK KEY ON ................................. Page 70 SET SCROLL LOCK KEY ON .............................. Page 71 COMMUNICATION COMMANDS: INITIALIZE COMMUNICATIONS LINE AT 300 BAUD .......... Page 73 INITIALIZE COMMUNICATIONS LINE AT 1200 BAUD ......... Page 74 INITIALIZE COMMUNICATIONS LINE AT 2400 BAUD ......... Page 75 INITIALIZE COMMUNICATIONS LINE AT 4800 BAUD ......... Page 76 INITIALIZE COMMUNICATIONS LINE AT 9600 BAUD ......... Page 77 COM PORT STATUS ..................................... Page 78 COMMUNICATIONS PORT DATA READY STATUS ............... Page 79 COMMUNICATIONS PORT OVERRUN ERROR STATUS ............ Page 80 COMMUNICATIONS PORT PARITY ERROR STATUS ............. Page 81 COMMUNICATIONS PORT FRAMING ERROR STATUS ............ Page 82 COMMUNICATIONS PORT BREAK INTERRUPT STATUS .......... Page 83 COMMUNICATIONS PORT THR STATUS ...................... Page 84 COMMUNICATIONS PORT TSR STATUS ...................... Page 85 COMMUNICATIONS PORT TIME-OUT ERROR STATUS ........... Page 86 INITIALIZE LINE PRINTER ............................. Page 87 LINE PRINTER STATUS ................................. Page 88 MODEM DELTA CLEAR TO SEND STATUS..................... Page 89 MODEM DELTA DATA SET READY STATUS ................... Page 90 MODEM TRAILING EDGE RING DETECTOR STATUS ............ Page 91 MODEM DELTA RECEIVE LINE SIGNAL DETECT STATUS ....... Page 92 MODEM CLEAR TO SEND STATUS .......................... Page 93 MODEM DATA SET READY STATUS ......................... Page 94 MODEM RING INDICATOR STATUS ......................... Page 95 MODEM RECEIVE LINE SIGNAL DETECT STATUS ............. Page 96 TABLE OF CONTENTS MISCELLANEOUS COMMANDS: CDROM DRIVER ........................................ Page 98 CDROM VERSION ....................................... Page 99 CURSOR COLUMN POSITION .............................. Page 100 CURSOR ROW POSITION ................................. Page 101 CURSOR SIZE ......................................... Page 102 DAY OF THE WEEK ..................................... Page 103 MOUSE CENTER BUTTON STATUS .......................... Page 104 MOUSE DRIVER ........................................ Page 105 MOUSE HIDE POINTER .................................. Page 106 MOUSE LEFT BUTTON STATUS ............................ Page 107 MOUSE LANGUAGE ...................................... Page 108 MOUSE RIGHT BUTTON STATUS ........................... Page 109 MOUSE SHOW POINTER .................................. Page 110 MOUSE TYPE .......................................... Page 111 MOUSE VERSION ....................................... Page 112 NUMBER OR CHARACTER ................................. Page 113 PRINT SCREEN ........................................ Page 114 XMS DRIVER .......................................... Page 115 INDEX ............................................... Page 116-117 INTRODUCTION FOXLIB is a command library that will allow you to perform low level commands from the dot prompt, FoxPro command window, and from within your favorite programs (i.e. FoxPro and FoxBASE +). Also, FOXLIB version 1.0 commands can be moved from one flavor of FOX (i.e. FoxPro version 1.02 and FoxBASE + version 2.1) to another without any modification. Please note that you will see the word FOX being used throughout this manual. FOX refers to FoxPro and FoxBASE +. FOXLIB was developed for the following reasons: (1) To help you support your FOX application. For example, if you include the GETPCENV.PRG program (included on the FOXLIB system disk when you register) in your application, you can quickly obtain information about your clients' PC environment. This should help you in supporting your FOX applications when you are talking with your client on the phone. (2) To help you install your FOX application. For example, if you use the INSTALL.PRG program (included on the FOXLIB system disk when you register) in your FOX installation program, you can perform low-level DOS commands in the background (e.g. MD, CHDIR, etc.). This will give your installation program a professional look. (3) To help your FOX program communicate with your printer. For example, an end-user has placed the incorrect baud rate in their config.sys file. You can initialize the serial printer with the correct baud rate within your FOX application. FOXLIB will not solve all of your problems, but it will give you an edge in supporting your FOX programs. You may already have noticed that the examples in this manual are from either the dot prompt or FoxPro command window. I did this to show you how easy the FOXLIB commands are to use. If you are a beginner to FOX, performing FOXLIB commands from the dot prompt or Foxpro command window will be easier to grasp. The intermediate and advanced FOX users can use all of the FOXLIB commands in their programs. Also, the FOXLIB commands will become very useful to the FOX user for the following reasons: (1) When executing DOS commands from the dot prompt or FoxPro command window, the FOX RUN command requires additional memory than FOXLIB since it has to load another DOS command.com file into memory. If the computer you or your client is using does not have sufficient memory for the RUN command (this could be due to your application or the amount of memory installed on the computer), you will receive the dreaded "Insufficient memory" error message on your computer screen, and you will not be able to execute your DOS command. (2) The FOXLIB commands are written in assembly language - the computer's language. Thus they are very fast, much faster than the RUN command, and take very little memory. As little as 20 bytes! (3) Most of the FOXLIB commands (e.g. nodrives, mousedrv, mathcopr, xmsdrv, cursor, printer status, etc.) are not accessible from the FOX RUN command. HARDWARE/SOFTWARE REQUIREMENTS & PACKAGE CONTENTS In order to use FOXLIB, you must have an IBM PC or 100% compatible, 640k of RAM, a 3.5" or 5.25" diskette drive, hard disk, FoxPro, FoxBASE +, and MS-DOS version 3.1 or higher (some of the FOXLIB commands will work with DOS version 2.1. When Microsoft enhanced MS-DOS in later versions, e.g. Microsoft CD-ROM extensions, FOXLIB requires MS-DOS 3.1 or greater). The FOXLIB software package includes the following three items: Command library that includes the binary files (e.g. cursor.bin) to be loaded and called into your FOX applications. ASCII manual. Registration form. INSTALLING FOXLIB for both 30-day trial and registered versions To install FOXLIB on your hard disk, perform the following steps: 1. Create a subdirectory on your hard disk with the name FOXLIB. For example, we'll assume you'll be creating a subdirectory on drive C on your hard disk. Type the following -> MD FOXLIB and press the return key. 2. Place the FOXLIB diskette into your floppy diskette drive, and then type the letter of the drive where you just placed the FOXLIB diskette. For example, if you placed the FOXLIB diskette into drive A, type the following -> A: and press the return key. 3. Copy all of the FOXLIB program files from drive A into the FOXLIB subdirectory. For example, type the following -> cd\prg copy *.prg c:\FOXLIB and press the return key. 4. Copy all of the FOXLIB command files from drive A into the FOXLIB subdirectory. For example, type the following -> cd\bin copy *.bin c:\FOXLIB and press the return key. 5. Copy all of the FOXLIB source code files from drive A into the FOXLIB subdirectory. For example, type the following -> cd\asm copy *.asm c:\FOXLIB and press the return key. That's all there is to installing FOXLIB on your hard disk. Please refer to your MS-DOS manual for questions using the CD, MD, and COPY commands. REGISTRATION & SOFTWARE SUPPORT PLEASE REGISTER YOUR SOFTWARE IMMEDIATELY BY COMPLETING THE REGISTRATION FORM ON THE NEXT PAGE. OTHERWISE, YOU WILL NOT RECEIVE TELEPHONE SOFTWARE SUPPORT FOR FOXLIB. BY REGISTRATING YOUR SOFTWARE, YOU WILL RECEIVE THE ASSEMBLY LANGUAGE SOURCE CODE FOR ALL FOXLIB COMMANDS, SAMPLE FOX PROGRAM FILES (E.G. GETPCENV.PRG), A PRINTED MANUAL, AND A 16 PAGE TUTORIAL SHOWING YOU HOW TO CREATE A FOX COMMAND USING THE MICROSOFT MACRO ASSEMBLER AND DOS'S DEBUG! Once your registration card has been received, you will receive 30 days free (you do pay for the phone call) software support, and my telephone number. During the 30 days of free software support, you must leave a phone number where I can contact you collect. After the 30 days have expired, you can purchase telephone software support. Please contact me for current rates. I look forward to answering any questions you may have using FOXLIB. Please understand that I cannot answer questions concerning how to program in FOX or assembly language. There are plenty of good programming books that can be purchased. Finally, please send the registration form along with a check for $45 (U.S. orders only, international orders are $65) when the 30 day trial period expires. If you use any of the FOXLIB commands commercially (e.g. consulting, software development, software testing, etc.) you must register FOXLIB immediately. It took hundreds of hours to write this library. Also, this library would cost from two to four times the registration fee if it was sold commercially. Your understanding is deeply appreciated. Mail check for $45 To: Sparkle Software Mike Fieldman 610 E. Bell Rd. Suite #2136 Phoenix, AZ 85022 (International orders are $65) Company:____________________________________________ Name:_______________________________________________ First Name:__________________ Last Name:____________________ Street Address:_____________________________________________ _____________________________________________ City:___________________ State:__ Zip Code:_________________ Day time phone number:________________________ Evening phone number:_________________________ FOX language you are currently using (please check): FoxBASE +___ FoxPro___ FOXLIB version:___ Using FOXLIB in your applications You can execute the FOXLIB commands from the dot prompt, FoxPro command window, and from within your FOX programs. This is a summary for using the FOXLIB commands included on the FOXLIB diskette. Please refer to each individual command located in this manual for specific information. In order to use FOXLIB, you must have FOX loaded in memory and be your foreground (active) application. I will use the CURSOR and NODRIVES FOXLIB commands for examples. Let's say you want to change the size of the cursor from a line to a block. To implement this you would perform the following commands from the dot prompt or FoxPro command window: . load c:\FOXLIB\cursor . FOXLIB = "B" . call cursor with FOXLIB . release module cursor the cursor size will now be a Û (block). Let's examine each dot prompt command in detail. (1) We loaded the command CURSOR.bin into memory. Notice you do not use the extension (.bin) of the file you are loading. (2) We created a parameter, B for block, that we will be sending to the CURSOR command. ONLY SEND THE PARAMETER SPECIFIED IN EACH FOXLIB COMMAND, I.E. DO NOT SEND A PARAMETER OTHER THAN WHAT IS ASKED OF YOU FOR EACH FOXLIB COMMAND. (3) We called the CURSOR command with the passed parameter "B" (You can pass character parameters to FOXLIB in either lower or upper case). (4) We released the command cursor.bin from memory. AFTER YOU LOAD AND CALL THE COMMAND YOU WANT TO USE, ALWAYS RELEASE IT FROM MEMORY. Please refer to your FOX manual for questions using the CALL, LOAD, and RELEASE MODULE commands. Using FOXLIB in your applications (cont.) The next example uses the NODRIVES FOXLIB command. If you wanted to determine the number of logical drives installed on an IBM PC, you would perform the following steps from the dot prompt or FoxPro command window: . load c:\FOXLIB\nodrives . FOXLIB = "NODRIVES" . call nodrives with FOXLIB . ?asc(substr(FOXLIB,1,1)) 6 . release module nodrives there are six drives installed on this computer system (drives A, B, C, D, E, and F). Let's examine each dot prompt command in detail. (1) We loaded the command NODRIVES.bin into memory. Notice you do not use the extension (.bin) of the file you are loading. (2) We created a parameter, NODRIVES, that we will be sending to the NODRIVES command. ONLY SEND THE PARAMETER SPECIFIED IN EACH FOXLIB COMMAND, I.E. DO NOT SEND A PARAMETER OTHER THAN WHAT IS ASKED OF YOU FOR EACH FOXLIB COMMAND. (3) We called the NODRIVES command with the parameter "NODRIVES" (You can pass character parameters to FOXLIB in either lower or upper case). (4) We determined the number of installed drives by converting the result to an ASCII code. (5) Finally, we released the command nodrives.bin from memory. AFTER YOU LOAD AND CALL THE COMMAND YOU WANT TO USE, ALWAYS RELEASE IT FROM MEMORY. When a FOXLIB command returns a value, you may have to convert the value to an ASCII code using just two FOX functions - SUBSTR and ASC. The SUBSTR and ASC functions are included with your FOX product (i.e. FoxBASE + and FoxPro). The SUBSTR function returns a specified number of characters from a string. For example, the string that was passed to the NODRIVES command was "NODRIVES." Since the NODRIVES command returns the value (number of installed drives) in the first letter of the string "NODRIVES" (in this case the letter N of NODRIVES), all we have to do is obtain the value of the first letter of the string. . load nodrives . FOXLIB = "NODRIVES" . call nodrives with FOXLIB . ?substr(FOXLIB,1,1) . HERE YOU WOULD SEE THE ASCII CODE "SPADE" SYMBOL We will convert the ASCII code "SPADE" symbol to a number to determine the number of installed drives. We'll do this using the ASC function. . ?asc(substr(FOXLIB,1,1)) 6 . release module nodrives If this seems complicated - DON'T WORRY! Just follow the instructions for each command and you'll do just fine. Please refer to your FOX manual for questions using the SUBSTR and ASC functions. EXAMPLES for registered version I included the following FOX programs on the registered FOXLIB diskette: GETPCENV.PRG is a simple FOX program that returns information from your PC environment. You will want to modify this file to suit your needs. One use of this routine would be to include it in a menu of your application to better solve telephone support calls (I know that this will not solve all problems, but at least it will give you a feel for the end users environment). Then you could ask the end user some basic questions regarding his/her PC configuration. The advantage to this is staying in your FOX application without having to shut it down and have the user perform DOS commands which he/she may not know. INSTALL.PRG is a simple installation FOX program. Again, You will want to modify this file to suit your needs. This routine can make installing your FOX application easier. COMMANDS.PRG is a FOX program that includes an example for each command in this manual. I did this so you can "cut and paste" the commands you need into your FOX source code. IMPORTANT! 1. MAKE SURE YOU RELEASE A FOXLIB COMMAND FROM MEMORY USING THE FOX "RELEASE MODULE" COMMAND AFTER YOU HAVE LOADED AND CALLED IT. THIS WILL FREE UP MEMORY AND YOU WON'T EXCEED THE MAXIMUM NUMBER OF ALLOWED LOADS IMPOSED BY FOX. Example: . load c:\FOXLIB\mousedrv . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. ÄÄÄÄÄÄÄÄÄ> . rele modu mousedrv 2. NEVER SEND A PARAMETER OTHER THAN WHAT IS SPECIFIED IN THE FOXLIB COMMAND. OTHERWISE, YOU COULD GET UNWANTED AND UNPREDICTABLE RESULTS. BELOW IS THE INCORRECT WAY TO PASS THE PARAMETER "MOUSE" USING THE MOUSE DRIVER FOXLIB COMMAND. Example: . load c:\FOXLIB\mousedrv ÄÄÄÄÄÄÄÄÄ> . FOXLIB = "MICKEYMOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv Below is the CORRECT way to pass the parameter "MOUSE" using the mouse driver FOXLIB command. Example: . load c:\FOXLIB\mousedrv ÄÄÄÄÄÄÄÄÄ> . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv Please refer to your FOX manual for questions using the LOAD, CALL, and RELEASE MODULE commands. 3. IN A MAINFRAME CLIMATE, YOU HAVE BOTH A TEST AND A PRODUCTION WORKING ENVIRONMENT. MAKE SURE YOU USE THE TEST ENVIRONMENT (I.E. USE ONLY A COPY OF YOUR DATA) WHEN FIRST USING ANY OR ALL OF THE FOXLIB COMMANDS. QUICK START for registered version If you have installed FOXLIB correctly to drive "C" of your hard disk, you can execute the GETPCENV.PRG program that came on your FOXLIB system disk. Just type "do getpcenv" from either the dot prompt or from within the FoxPro command window. DOS COMMANDS CREATDIR Syntax: CREATDIR Use: To create a subdirectory. Parameters: The directory you want to create (e.g. C:\BACKUP). Returns: The first character in the sending parameter will have a "Y" (i.e. true) if the subdirectory was created, and a "N" if the subdirectory could not be created (e.g. if it already exists). If you did not pass the parameter correctly (e.g. FOXLIB = "\backup"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\creatdir . FOXLIB = "C:\BACKUP" . call creatdir with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu creatdir From this example, the subdirectory C:\BACKUP was created. Example: if substr(FOXLIB,1,1) = "Y" copy to c:\backup\filecopy endif From the above example, you could save information to a backup subdirectory for archives. See: REMOVDIR, SETDIR DOSVERS Syntax: DOSVERS Use: To determine the DOS version. Parameters: DOS Returns: The first character in the sending parameter will have the DOS major version number, and the second character in the sending parameter will have the DOS minor version number. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOS"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\dosvers . FOXLIB = "DOS" . call dosvers with FOXLIB . ?asc(substr(FOXLIB,1,1)) 3 . ?asc(substr(FOXLIB,2,1)) 30 . rele modu dosvers From this example, the DOS version is 3.30. Your application may require a certain DOS version, i.e. 3.30 or higher. Example: load dosvers FOXLIB = "DOS" call dosvers with FOXLIB IF asc(substr(FOXLIB,1,1)) < 3 @ 3,0 Say "Application requires DOS 3.3 or" @ 4,0 Say "greater. Press any key to exit." Wait "" return Endif IF asc(substr(FOXLIB,1,1)) = 3 .and. asc(substr(FOXLIB,2,1)) < 30 @ 3,0 Say "Application requires DOS 3.3 or" @ 4,0 Say "greater. Press any key to exit." Wait "" return Endif If your application needs more than 20 file handles open at one time, make sure the DOS version is greater than or equal to 3.30. DRIVERDY Syntax: DRIVERDY Use: To see if floppy disk drive A or B is ready. Parameters: Drive letter (A or B). Returns: The first character in the sending parameter will have a "Y" if the floppy drive is ready, a "N" if the floppy drive is not ready. If you did not pass the parameter correctly (e.g. FOXLIB = "/"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\driverdy . FOXLIB = "B" . call driverdy with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu driverdy From this example, drive B is ready for retrieval or saving of data. See: FIXEDRRV, GETDRIVE, AND SETDRIVE GETDRIVE Syntax: GETDRIVE Use: To determine the current drive. Parameters: GETDRIVE Returns: The first character in the sending parameter will have the current drive letter (A, B, C, etc.). If you did not pass the parameter correctly (e.g. FOXLIB = "ZETDRIVE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\getdrive . FOXLIB = "GETDRIVE" . call getdrive with FOXLIB . ?substr(FOXLIB,1,1) C . rele modu getdrive From this example, the current drive is C. See: SETDRIVE GETATTR Syntax: GETATTR Use: To determine the file attribute. Parameters: The subdirectory and the file name (e.g. \FOXPRO\FOXPROLN.EXE). Do not include the drive letter and the colon, but you must include the backslash "\". Returns: The first character in the sending parameter will have the file attribute. If you did not pass the parameter correctly (e.g. FOXLIB = "\FOXPRO\"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\getattr . FOXLIB = "\IO.SYS" . call getattr with FOXLIB . ?asc(substr(FOXLIB,1,1)) 39 . rele modu getattr From this example, the file attribute is archive, system, hidden, and read-only. Below is a list of all possible outcomes: Archive, system, hidden, read-only = 39 Archive = 32 Archive, system = 36 Archive, system, hidden = 38 Archive, hidden = 34 Archive, read-only = 33 System = 4 System, hidden = 6 System, read-only = 5 Hidden = 2 Hidden, read-only = 3 Read-only = 1 No attributes set = 0 See: SETATTR Notes: You can only obtain the file attribute from the current drive. For example, you are in drive C, and you want to obtain the file attribute for a file on drive D. Use the SETDRIVE command to set the current drive to D, and then use the GETATTR command. GETVERFY Syntax: GETVERFY Use: To determine if the verify flag is on or off. Parameters: GETVERIFY Returns: The first character in the sending parameter will have a "Y" if verify is on, a "N" if verify is off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZETVERIFY"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\getverfy . FOXLIB = "GETVERIFY" . call getverfy with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu getverfy From this example, verify is on. Having verify on can dramatically slow down your FOX application since DOS performs a verify operation after each disk write to ensure that the data has been recorded correctly. See: SETVERFY REMOVDIR Syntax: REMOVDIR Use: To remove a subdirectory. Parameters: The directory you want to remove (e.g. C:\BACKUP). Returns: The first character in the sending parameter will have a "Y" (i.e. true) if the subdirectory was removed, and a "N" if the subdirectory could not be removed (e.g. if it already was removed). If you did not pass the parameter correctly (e.g. FOXLIB = "\backup"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\removdir . FOXLIB = "C:\BACKUP" . call removdir with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu removdir From this example, the subdirectory C:\BACKUP was removed. See: CREATDIR, SETDIR SETDIR Syntax: SETDIR Use: To set a subdirectory. Parameters: The directory you want to set (e.g. C:\BACKUP). Returns: The first character in the sending parameter will have a "Y" (i.e. true) if the subdirectory was set, and a "N" if the subdirectory was not set. If you did not pass the parameter correctly (e.g. FOXLIB = "\backup"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\setdir . FOXLIB = "C:\BACKUP" . call setdir with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu setdir From this example, the subdirectory was set to c"\backup." Example: if substr(FOXLIB,1,1) = "Y" copy to c:\backup\filecopy endif From the above example, you could first verify that a subdirectory exists. If it does, you could then copy information to it. Notes: Please note that when you use the SETDIR FOXLIB command, you will make that subdirectory the current subdirectory. See: CREATDIR, REMOVDIR SETDRIVE Syntax: SETDRIVE Use: To set a disk drive. Parameters: Drive letter (A=0, B=1, C=2,..., Z=25). Returns: The first character in the sending parameter will have a "Y" if the drive number was set, a "N" if the drive number was not set. If you did not pass the parameter correctly (e.g. FOXLIB = "/"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\setdrive . FOXLIB = "B" . call setdrive with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu setdrive From this example, the drive was set to B. See: GETDRIVE SETATTR Syntax: SETATTR Use: To set the file attribute. Parameters: The subdirectory, the file name, and the file attribute (e.g. \FOXPRO\FOXPROLN.EXE,!). You do not include the drive letter, but you mus 0'  *e backslash "\". Returns: The first character in the sending parameter will have a "Y" if the file attribute was set, a "N" if the file attribute was not set. If you did not pass the parameter correctly (e.g. FOXLIB = "\FOXPRO\"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\setattr . FOXLIB = "\FOXPRO\MIKE.TXT,!" . call setattr with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu setattr From this example, the file attribute was set to archive and read-only. Below is a list of parameters to use in setting file attributes. Archive, system, hidden, read-only = ' Archive, system, hidden = & Archive, system = $ Archive, read-only = ! Archive, hidden = # Archive = space System, hidden = 6 System, read-only = 5 System = 4 Hidden, read-only = 3 Hidden = 2 Read-only = 1 When setting just the archive file attribute, use a space. For example: . FOXLIB = "\FOXPRO\MIKE.TXT, " See: GETATTR Notes: You can only set the file attribute from the current drive. For example, you are in drive C, and you want to set the file attribute for a file on drive D. Use the SETDRIVE command to set the current drive to D, and then use the SETATTR command. SETVERFY Syntax: SETVERFY Use: To set the verify flag on or off. Parameters: 1 or 0. 1 to set on, 0 to set off. Returns: The first character in the sending parameter will have a "Y" if verify was set on, a "Y" if verify was set off. If you did not pass the parameter correctly (e.g. FOXLIB = "Z"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\setverfy . FOXLIB = "0" . call setverfy with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu setverfy From this example, verify was successfully set to off. See: GETVERFY EQUIPMENT COMMANDS BIOSDATE Syntax: BIOSDATE Use: To determine the date of the ROM BIOS. Parameters: BIOSDATE Returns: The first eight characters in the FOXLIB parameter will have the date of the ROM BIOS. If you did not pass the parameter correctly (e.g. FOXLIB = "ZIOSDATE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\biosdate . FOXLIB = "BIOSDATE" . call biosdate with FOXLIB . ?FOXLIB 06/26/89 . rele modu biosdate From this example, the date of the ROM BIOS is June 26, 1989. CONVMEM Syntax: CONVMEM Use: To determine the amount of installed conventional memory. Parameters: CONV Returns: The first three characters in the sending parameter will have the amount of conventional memory installed on the computer system. If you did not pass the parameter correctly (e.g. FOXLIB = "ZONV"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\convmem . FOXLIB = "CONV" . call convmem with FOXLIB . ?substr(FOXLIB,1,3) 640 . rele modu convmem From this example, there is 640K of conventional memory installed on the computer system. Example: if val(substr(FOXLIB,1,3) <> 640 @ 1,0 Say "Error! Need 640K of conventional" @ 2,0 Say "memory to load application." @ 3,0 Say "program." endif If your application requires 640K of conventional memory, first determine the amount of installed conventional memory before loading your program. See: EXTMEM EXTMEM Syntax: EXTMEM Use: To determine the amount of extended memory. Parameters: EXTMEM Returns: The first five characters in the sending parameter will have the amount of extended memory installed on the computer system. If you did not pass the parameter correctly (e.g. FOXLIB = "ZXTMEM"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\extmem . FOXLIB = "EXTMEM" . call extmem with FOXLIB . ?RTRIM(FOXLIB) 3072 . rele modu extmem From this example, there is 3072K of extended memory installed on the computer system. Notice the FOX function RTRIM being used here to remove any trailing spaces. See: CONVMEM GAMEADAP Syntax: GAMEADAP Use: To determine if a game adapter is installed. Parameters: GAME Returns: The first character in the sending parameter will have a "Y" if a game adapter is installed, a "N" if it does not exist. If you did not pass the parameter correctly (e.g. FOXLIB = "ZAME"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\gameadap . FOXLIB = "GAME" . call gameadap with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu gameadap From this example, a game adapter is installed. MATHCOPR Syntax: MATHCOPR Use: To determine if a math coprocessor is present. Parameters: MATH Returns: The first character in the sending parameter will have a "Y" if a math coprocessor exists, a "N" if it does not exist. If you did not pass the parameter correctly (e.g. FOXLIB = "ZATH"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mathcopr . FOXLIB = "MATH" . call mathcopr with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mathcopr From this example, a math coprocessor is installed. MCA Syntax: MCA Use: To determine if Micro Channel Architecture. Parameters: MCA Returns: The first character in the sending parameter will have a "Y" if a Micro Channel Architecture is present, a "N" if it is not present. If you did not pass the parameter correctly (e.g. FOXLIB = "ZCA"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mca . FOXLIB = "MCA" . call mca with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mca From this example, Micro Channel Architecture is present. See: PCBUS NODRIVES Syntax: NODRIVES Use: To determine the number of installed disk drives. Parameters: NODRIVES Returns: The first character in the sending parameter will have the number of disk drives installed. If you did not pass the parameter correctly (e.g. FOXLIB = "ZODRIVES"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\nodrives . FOXLIB = "NODRIVES" . call nodrives with FOXLIB . ?asc(substr(FOXLIB,1,1)) 26 . rele modu nodrives From this example, there are 26 installed disk drives. These disk drives could be two floppy drives A and B; a hard disk partitioned into three drives C, D, and E; and ram disks (F through Z). PCBUS Syntax: PCBUS Use: To determine if PC bus I/O channel. Parameters: PCBUS Returns: The first character in the sending parameter will have a "Y" if a PC bus I/O channel is present, a "N" if it is not present. If you did not pass the parameter correctly (e.g. FOXLIB = "ZCBUS"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\pcbus . FOXLIB = "PCBUS" . call pcbus with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu pcbus From this example, PC bus I/O channel is present. See: MCA Notes: This command will not work on the PC/AT dated before 6/10/85. PC Syntax: PC Use: To determine if PC. Parameters: PC Returns: The first character in the sending parameter will have a "Y" if PC, a "N" if it is not a PC. If you did not pass the parameter correctly (e.g. FOXLIB = "ZC"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\pc . FOXLIB = "PC" . call pc with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu pc From this example, it is a true PC. PCXT Syntax: PCXT Use: To determine if PC/XT. Parameters: PCXT Returns: The first character in the sending parameter will have a "Y" if PC/XT, a "N" if it is not a PC/XT. If you did not pass the parameter correctly (e.g. FOXLIB = "ZCXT"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\pcxt . FOXLIB = "PCXT" . call pcxt with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu pcxt From this example, it is a PC/XT. PCAT Syntax: PCAT Use: To determine if PC/AT. Parameters: PCAT Returns: The first character in the sending parameter will have a "Y" if PC/AT, a "N" if it is not a PC/AT. If you did not pass the parameter correctly (e.g. FOXLIB = "ZCAT"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\pcat . FOXLIB = "PCAT" . call pcat with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu pcat From this example, it is a PC/AT. PCJR Syntax: PCJR Use: To determine if PC/JR. Parameters: PCJR Returns: The first character in the sending parameter will have a "Y" if PC/JR, a "N" if it is not a PC/JR. If you did not pass the parameter correctly (e.g. FOXLIB = "ZCJR"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\pcjr . FOXLIB = "PCJR" . call pcjr with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu pcjr From this example, it is a PC jr. PCXT286 Syntax: PCXT286 Use: To determine if PC/XT 286. Parameters: PCXT286 Returns: The first character in the sending parameter will have a "Y" if PC/XT 286, a "N" if it is not a PC/XT 286. If you did not pass the parameter correctly (e.g. FOXLIB = "ZCXT286"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\pcxt286 . FOXLIB = "PCXT286" . call pcxt286 with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu pcxt286 From this example, it is a PC/XT 286. PCCONV Syntax: PCCONV Use: To determine if PC Convertible. Parameters: PCCONV Returns: The first character in the sending parameter will have a "Y" if PC Convertible, a "N" if it is not a PC Convertible. If you did not pass the parameter correctly (e.g. FOXLIB = "ZCCONV"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\pcconv . FOXLIB = "PCCONV" . call pcconv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu pcconv From this example, it is a PC Convertible. PS2M30 Syntax: PS2M30 Use: To determine if PS/2 Model 30. Parameters: PS2M30 Returns: The first character in the sending parameter will have a "Y" if PS/2 Model 30, a "N" if it is not a PS/2 Model 30. If you did not pass the parameter correctly (e.g. FOXLIB = "ZS2M30"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\ps2m30 . FOXLIB = "PS2M30" . call ps2m30 with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu ps2m30 From this example, it is a PS/2 Model 30. PS2M50 Syntax: PS2M50 Use: To determine if PS/2 Model 50. Parameters: PS2M50 Returns: The first character in the sending parameter will have a "Y" if PS/2 Model 50, a "N" if it is not a PS/2 Model 50. If you did not pass the parameter correctly (e.g. FOXLIB = "ZS2M50"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\ps2m50 . FOXLIB = "PS2M50" . call ps2m50 with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu ps2m50 From this example, it is a PS/2 Model 50. PS2M55 Syntax: PS2M55 Use: To determine if PS/2 Model 55 SX. Parameters: PS2M55 Returns: The first character in the sending parameter will have a "Y" if PS/2 Model 55, a "N" if it is not a PS/2 Model 55. If you did not pass the parameter correctly (e.g. FOXLIB = "ZS2M55"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\ps2m55 . FOXLIB = "PS2M55" . call ps2m55 with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu ps2m55 From this example, it is a PS/2 Model 55 SX. PS2M60 Syntax: PS2M60 Use: To determine if PS/2 Model 60. Parameters: PS2M60 Returns: The first character in the sending parameter will have a "Y" if PS/2 Model 60, a "N" if it is not a PS/2 Model 60. If you did not pass the parameter correctly (e.g. FOXLIB = "ZS2M60"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\ps2m60 . FOXLIB = "PS2M60" . call ps2m60 with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu ps2m60 From this example, it is a PS/2 Model 60. PS2M70 Syntax: PS2M70 Use: To determine if PS/2 Model 70. Parameters: PS2M70 Returns: The first character in the sending parameter will have a "Y" if PS/2 Model 70, a "N" if it is not a PS/2 Model 70. If you did not pass the parameter correctly (e.g. FOXLIB = "ZS2M70"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\ps2m70 . FOXLIB = "PS2M70" . call ps2m70 with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu ps2m70 From this example, it is a PS/2 Model 70. PS2M80 Syntax: PS2M80 Use: To determine if PS/2 Model 80. Parameters: PS2M80 Returns: The first character in the sending parameter will have a "Y" if PS/2 Model 80, a "N" if it is not a PS/2 Model 80. If you did not pass the parameter correctly (e.g. FOXLIB = "ZS2M80"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\ps2m80 . FOXLIB = "PS2M80" . call ps2m80 with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu ps2m80 From this example, it is a PS/2 Model 80. PARALLEL Syntax: PARALLEL Use: To determine if a parallel port exists. Parameters: PARALLEL Returns: The first character in the sending parameter will have a "Y" if a parallel port exists, and a "N" if a parallel port does not exist. If you did not pass the parameter correctly (e.g. FOXLIB = "ZARALLEL"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\parallel . FOXLIB = "PARALLEL" . call parallel with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu parallel From this example, a parallel port does exist. REALTIME Syntax: REALTIME Use: To determine if a real-time clock is present. Parameters: REALTIME Returns: The first character in the sending parameter will have a "Y" if a real-time clock is present, a "N" if it is not present. If you did not pass the parameter correctly (e.g. FOXLIB = "ZEALTIME"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\realtime . FOXLIB = "REALTIME" . call realtime with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu realtime From this example, a real-time clock is present. Notes: This command will not work on the PC/AT dated before 6/10/85. SCRNSIZE Syntax: SCRNSIZE Use: To determine the mode (width in characters) on the computer screen (possible outcomes are 40 or 80). Parameters: SCRNSIZE Returns: The first character in the sending parameter will have the width of characters. If you did not pass the parameter correctly (e.g. FOXLIB = "ZCRNSIZE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\scrnsize . FOXLIB = "SCRNSIZE" . call scrnsize with FOXLIB . ?asc(substr(FOXLIB,1,1)) 80 . rele modu scrnsize From this example, the screen width is 80 characters. SERIAL Syntax: SERIAL Use: To determine if a serial port exists. Parameters: SERIAL Returns: The first character in the sending parameter will have a "Y" if a serial port exists, and a "N" if a serial port does not exist. If you did not pass the parameter correctly (e.g. FOXLIB = "ZERIAL"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\serial . FOXLIB = "SERIAL" . call serial with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu serial From this example, a serial port exists. KEYBOARD COMMANDS CAPSSTAT Syntax: CAPSSTAT Use: To determine if the Caps Lock key is on. Parameters: CAPS Returns: The first character in the sending parameter will have a "Y" if the Caps Lock key is on, a "N" if it is off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZAPS"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\capsstat . FOXLIB = "CAPS" . call capsstat with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu capsstat From this example, the Caps Lock key is on. Notes: Make sure you re-load capsstat into memory each time you determine if the Caps Lock key is on or off. INSSTAT Syntax: INSSTAT Use: To determine if the Insert key is on. Parameters: INS Returns: The first character in the sending parameter will have a "Y" if the Insert key is on, a "N" if it is off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZNS"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\insstat . FOXLIB = "INS" . call insstat with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu insstat From this example, the Insert key is on. Notes: Make sure you re-load insstat into memory each time you determine if the Insert Lock key is on or off. LEFTSHFT Syntax: LEFTSHFT Use: To determine if the Left Shift key is down. Parameters: LEFT Returns: The first character in the sending parameter will have a "Y" if the Left Shift key is down, a "N" if it is not down. If you did not pass the parameter correctly (e.g. FOXLIB = "ZEFT"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\leftshft . FOXLIB = "LEFT" . call leftshft with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu leftshft From this example, the Left Shift key is down. Notes: Make sure you re-load leftshft into memory each time you determine if the Left Shift key is down. NUMSTAT Syntax: NUMSTAT Use: To determine if the Num Lock key is on. Parameters: NUM Returns: The first character in the sending parameter will have a "Y" if the Num Lock key is on, a "N" if it is off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZUM"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\numstat . FOXLIB = "NUM" . call numstat with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu numstat From this example, the Num Lock key is on. Notes: Make sure you re-load numstat into memory each time you determine if the Num Lock key is on or off. RGHTSHFT Syntax: RGHTSHFT Use: To determine if the Left Shift key is down. Parameters: RIGHT Returns: The first character in the sending parameter will have a "Y" if the Right Shift key is down, a "N" if it is not down. If you did not pass the parameter correctly (e.g. FOXLIB = "ZIGHT"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\rghtshft . FOXLIB = "RIGHT" . call rghtshft with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu rghtshft From this example, the Right Shift key is down. Notes: Make sure you re-load rghtshft into memory each time you determine if the Right Shift key is down. SCRLSTAT Syntax: SCRLSTAT Use: To determine if the Scroll Lock key is on. Parameters: SCRL Returns: The first character in the sending parameter will have a "Y" if the Scroll Lock key is on, a "N" if it is off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZCRL"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\scrlstat . FOXLIB = "SCRL" . call scrlstat with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu scrlstat From this example, the Scroll Lock key is on. Notes: Make sure you re-load scrlstat into memory each time you determine if the Scroll Lock key is on or off. CAPSOFF Syntax: CAPSOFF Use: To set the Caps Lock key off. Parameters: CAPS Returns: Nothing is returned. If you did not pass the parameter correctly (e.g. sending = "ZAPS"), your FOXLIB parameter will be unchanged. Example: . load c:\FOXLIB\capsoff . FOXLIB = "CAPS" . call capsoff with FOXLIB . rele modu capsoff From this example, the Caps Lock key is set off. Notes: Make sure you re-load capsoff into memory each time you set the Caps Lock key off. NUMOFF Syntax: NUMOFF Use: To set the Num Lock key off. Parameters: NUM Returns: Nothing is returned. If you did not pass the parameter correctly (e.g. FOXLIB = "ZUM"), your FOXLIB parameter will be unchanged. Example: . load c:\FOXLIB\numoff . FOXLIB = "NUM" . call numoff with FOXLIB . rele modu numoff From this example, the Num Lock key is set off. Notes: Make sure you re-load numoff into memory each time you set the Num Lock key off. SCRLOFF Syntax: SCRLOFF Use: To set the Scroll Lock key off. Parameters: SCRL Returns: Nothing is returned. If you did not pass the parameter correctly (e.g. FOXLIB = "ZCRL"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\scrloff . FOXLIB = "SCRL" . call scrloff with FOXLIB . rele modu scrloff From this example, the Scroll Lock key is set off. Notes: Make sure you re-load scrloff into memory each time you set the Scroll Lock key off. CAPSON Syntax: CAPSON Use: To set the Caps Lock key on. Parameters: CAPS Returns: Nothing is returned. If you did not pass the parameter correctly (e.g. FOXLIB = "ZAPS"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\capson . FOXLIB = "CAPS" . call capson with FOXLIB . rele modu capson From this example, the Caps Lock key is set on. Notes: Make sure you re-load capson into memory each time you set the Caps Lock key on. NUMON Syntax: NUMON Use: To set the Num Lock key on. Parameters: NUM Returns: Nothing is returned. If you did not pass the parameter correctly (e.g. FOXLIB = "ZUM"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\numon . FOXLIB = "NUM" . call numon with FOXLIB . rele modu numon From this example, the Num Lock key is set on. Notes: Make sure you re-load numon into memory each time you set the Num Lock key on. SCRLON Syntax: SCRLON Use: To set the Scroll Lock key on. Parameters: SCRL Returns: Nothing is returned. If you did not pass the parameter correctly (e.g. sending = "ZCRL"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\scrlon . FOXLIB = "SCRL" . call scrlon with FOXLIB . rele modu scrlon From this example, the Scroll Lock key is set on. Notes: Make sure you re-load scrlon into memory each time you set the Scroll Lock key on. COMMUNICATION COMMANDS COM300 Syntax: COM300 Use: To initialize the communications line at 300 baud. Parameters: In order to initialize the communications line, the baud rate, parity, stop bit, and data length parameters have to be set. Use the table below to initialize the communications lines 1, 2, 3, and 4. If you wanted to initialize communications line 1 at 300 baud, no parity, 1 stop bit, and 7 data length, you would choose the letter "A" from the table below and add a comma and the communications line to initialize - in this case the number 0. Remember, that communications line 1 is 0, line 2 is 1, line 3 is 2, and line 4 is 3. 300, no parity, 1 stop bit, 7 data length = A 300, no parity, 1 stop bit, 8 data length = B 300, no parity, 2 stop bit, 7 data length = C 300, no parity, 2 stop bit, 8 data length = D 300, odd parity, 1 stop bit, 7 data length = E 300, odd parity, 1 stop bit, 8 data length = F 300, odd parity, 2 stop bit, 7 data length = G 300, odd parity, 2 stop bit, 8 data length = H 300, even parity, 1 stop bit, 7 data length = I 300, even parity, 1 stop bit, 8 data length = J 300, even parity, 2 stop bit, 7 data length = K 300, even parity, 2 stop bit, 8 data length = L Returns: Use the FOXLIB communications status commands (i.e. COMSTAT, COMDR, COMOE, COMPE, COMFE, COMBID, COMTHR, COMTSR, and COMTOE) to obtain the status of the communications line if the return value is not equal to 1 or 97. If the return value is not equal to 1 or 97, load and call COM300 again to see if any errors disappear. If you did not pass the parameter correctly (e.g. FOXLIB = "Z,0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\com300 . FOXLIB = "A,0" . call com300 with FOXLIB . ?substr(FOXLIB,1,1) = "A" .F. . ?asc(substr(FOXLIB,1,1)) = 97 .T. . rele modu com300 First test to see if you passed the parameter correctly. From this example, the parameter was passed correctly since the first character is not equal to "A". COM1200 Syntax: COM1200 Use: To initialize the communications line at 1200 baud. Parameters: In order to initialize the communications line, the baud rate, parity, stop bit, and data length parameters have to be set. Use the table below to initialize the communications lines 1, 2, 3, and 4. If you wanted to initialize communications line 1 at 1200 baud, no parity, 1 stop bit, and 7 data length, you would choose the letter "A" from the table below and add a comma and the communications line to initialize - in this case the number 0. Remember, that communications line 1 is 0, line 2 is 1, line 3 is 2, and line 4 is 3. 1200, no parity, 1 stop bit, 7 data length = A 1200, no parity, 1 stop bit, 8 data length = B 1200, no parity, 2 stop bit, 7 data length = C 1200, no parity, 2 stop bit, 8 data length = D 1200, odd parity, 1 stop bit, 7 data length = E 1200, odd parity, 1 stop bit, 8 data length = F 1200, odd parity, 2 stop bit, 7 data length = G 1200, odd parity, 2 stop bit, 8 data length = H 1200, even parity, 1 stop bit, 7 data length = I 1200, even parity, 1 stop bit, 8 data length = J 1200, even parity, 2 stop bit, 7 data length = K 1200, even parity, 2 stop bit, 8 data length = L Returns: Use the FOXLIB communications status commands (i.e. COMSTAT, COMDR, COMOE, COMPE, COMFE, COMBID, COMTHR, COMTSR, and COMTOE) to obtain the status of the communications line if the return value is not equal to 1 or 97. If the return value is not equal to 1 or 97, load and call COM1200 again to see if any errors disappear. If you did not pass the parameter correctly (e.g. FOXLIB = "Z,0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\com1200 . FOXLIB = "1,0" . call com1200 with FOXLIB . ?substr(FOXLIB,1,1) = "A" .F. . ?asc(substr(FOXLIB,1,1)) = 97 .T. . rele modu com1200 First test to see if you passed the parameter correctly. From this example, the parameter was passed correctly since the first character is not equal to "A". COM2400 Syntax: COM2400 Use: To initialize the communications line at 2400 baud. Parameters: In order to initialize the communications line, the baud rate, parity, stop bit, and data length parameters have to be set. Use the table below to initialize the communications lines 1, 2, 3, and 4. If you wanted to initialize communications line 1 at 2400 baud, no parity, 1 stop bit, and 7 data length, you would choose the letter "A" from the table below and add a comma and the communications line to initialize - in this case the number 0. Remember, that communications line 1 is 0, line 2 is 1, line 3 is 2, and line 4 is 3. 2400, no parity, 1 stop bit, 7 data length = A 2400, no parity, 1 stop bit, 8 data length = B 2400, no parity, 2 stop bit, 7 data length = C 2400, no parity, 2 stop bit, 8 data length = D 2400, odd parity, 1 stop bit, 7 data length = E 2400, odd parity, 1 stop bit, 8 data length = F 2400, odd parity, 2 stop bit, 7 data length = G 2400, odd parity, 2 stop bit, 8 data length = H 2400, even parity, 1 stop bit, 7 data length = I 2400, even parity, 1 stop bit, 8 data length = J 2400, even parity, 2 stop bit, 7 data length = K 2400, even parity, 2 stop bit, 8 data length = L Returns: Use the FOXLIB communications status commands (i.e. COMSTAT, COMDR, COMOE, COMPE, COMFE, COMBID, COMTHR, COMTSR, and COMTOE) to obtain the status of the communications line if the return value is not equal to 1 or 97. If the return value is not equal to 1 or 97, load and call COM2400 again to see if any errors disappear. If you did not pass the parameter correctly (e.g. FOXLIB = "Z,0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\com2400 . FOXLIB = "A,0" . call com2400 with FOXLIB . ?substr(FOXLIB,1,1) = "A" .F. . ?asc(substr(FOXLIB,1,1)) = 97 .T. . rele modu com2400 First test to see if you passed the parameter correctly. From this example, the parameter was passed correctly since the first character is not equal to "A". COM4800 Syntax: COM4800 Use: To initialize the communications line at 4800 baud. Parameters: In order to initialize the communications line, the baud rate, parity, stop bit, and data length parameters have to be set. Use the table below to initialize the communications lines 1, 2, 3, and 4. If you wanted to initialize communications line 1 at 4800 baud, no parity, 1 stop bit, and 7 data length, you would choose the letter "A" from the table below and add a comma and the communications line to initialize - in this case the number 0. Remember, that communications line 1 is 0, line 2 is 1, line 3 is 2, and line 4 is 3. 4800, no parity, 1 stop bit, 7 data length = A 4800, no parity, 1 stop bit, 8 data length = B 4800, no parity, 2 stop bit, 7 data length = C 4800, no parity, 2 stop bit, 8 data length = D 4800, odd parity, 1 stop bit, 7 data length = E 4800, odd parity, 1 stop bit, 8 data length = F 4800, odd parity, 2 stop bit, 7 data length = G 4800, odd parity, 2 stop bit, 8 data length = H 4800, even parity, 1 stop bit, 7 data length = I 4800, even parity, 1 stop bit, 8 data length = J 4800, even parity, 2 stop bit, 7 data length = K 4800, even parity, 2 stop bit, 8 data length = L Returns: Use the FOXLIB communications status commands (i.e. COMSTAT, COMDR, COMOE, COMPE, COMFE, COMBID, COMTHR, COMTSR, and COMTOE) to obtain the status of the communications line if the return value is not equal to 1 or 97. If the return value is not equal to 1 or 97, load and call COM4800 again to see if any errors disappear. If you did not pass the parameter correctly (e.g. FOXLIB = "Z,0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\com4800 . FOXLIB = "A,0" . call com4800 with FOXLIB . ?substr(FOXLIB,1,1) = "A" .F. . ?asc(substr(FOXLIB,1,1)) = 97 .T. . rele modu com4800 First test to see if you passed the parameter correctly. From this example, the parameter was passed correctly since the first character is not equal to "A". COM9600 Syntax: COM9600 Use: To initialize the communications line at 9600 baud. Parameters: In order to initialize the communications line, the baud rate, parity, stop bit, and data length parameters have to be set. Use the table below to initialize the communications lines 1, 2, 3, and 4. If you wanted to initialize communications line 1 at 9600 baud, no parity, 1 stop bit, and 7 data length, you would choose the letter "A" from the table below and add a comma and the communications line to initialize - in this case the number 0. Remember, that communications line 1 is 0, line 2 is 1, line 3 is 2, and line 4 is 3. 9600, no parity, 1 stop bit, 7 data length = A 9600, no parity, 1 stop bit, 8 data length = B 9600, no parity, 2 stop bit, 7 data length = C 9600, no parity, 2 stop bit, 8 data length = D 9600, odd parity, 1 stop bit, 7 data length = E 9600, odd parity, 1 stop bit, 8 data length = F 9600, odd parity, 2 stop bit, 7 data length = G 9600, odd parity, 2 stop bit, 8 data length = H 9600, even parity, 1 stop bit, 7 data length = I 9600, even parity, 1 stop bit, 8 data length = J 9600, even parity, 2 stop bit, 7 data length = K 9600, even parity, 2 stop bit, 8 data length = L Returns: Use the FOXLIB communications status commands (i.e. COMSTAT, COMDR, COMOE, COMPE, COMFE, COMBID, COMTHR, COMTSR, and COMTOE) to obtain the status of the communications line if the return value is not equal to 1 or 97. If the return value is not equal to 1 or 97, load and call COM9600 again to see if any errors disappear. If you did not pass the parameter correctly (e.g. FOXLIB = "Z,0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\com9600 . FOXLIB = "A,0" . call com9600 with FOXLIB . ?substr(FOXLIB,1,1) = "A" .F. . ?asc(substr(FOXLIB,1,1)) = 97 .T. . rele modu com9600 First test to see if you passed the parameter correctly. From this example, the parameter was passed correctly since the first character is not equal to "A". COMSTAT Syntax: COMSTAT Use: To determine if a communications line is data ready. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have the status of the communication line. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\comstat . FOXLIB = "COM0" . call comstat with FOXLIB . ?asc(substr(FOXLIB,1,1)) = 97 .T. . rele modu comstat From this example, the status of communication port 1 is: data ready, transfer holding register empty, and transfer shift register empty. If the return value is not equal to 1 or 97, load and call COMSTAT again to see if any errors disappear. If you did not receive a value of 1 or 97, then an error occurred, and the communications port may not ready to properly receive data. COMDR Syntax: COMDR Use: To determine the status of data ready. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if data ready is turned on, a "N" if data ready is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\comdr . FOXLIB = "COM0" . call comdr with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu comdr From this example, data ready is turned on. COMOE Syntax: COMOE Use: To determine the status of overrun error. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if overrun error is turned on, a "N" if overrun error is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\comoe . FOXLIB = "COM0" . call comoe with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu comoe From this example, overrun error is turned on. COMPE Syntax: COMPE Use: To determine the status of parity error. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if parity error is turned on, a "N" if parity error is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\compe . FOXLIB = "COM0" . call compe with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu compe From this example, parity error is turned on. COMFE Syntax: COMFE Use: To determine the status of framing error. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if framing error is turned on, a "N" if framing error is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\comfe . FOXLIB = "COM0" . call comfe with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu comfe From this example, framing error is turned on. COMBID Syntax: COMBID Use: To determine the status of break interrupt detected. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if break interrupt detected is turned on, a "N" if break interrupt detected is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\combid . FOXLIB = "COM0" . call combid with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu combid From this example, break interrupt detected is turned on. COMTHR Syntax: COMTHR Use: To determine the status of transfer holding register empty. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if transfer holding register empty is turned on, a "N" if transfer holding register empty is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\comthr . FOXLIB = "COM0" . call comthr with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu comthr From this example, transfer holding register empty is turned on. COMTSR Syntax: COMTSR Use: To determine the status of transfer shift register empty. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if transfer shift register empty is turned on, a "N" if transfer shift register empty is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\comtsr . FOXLIB = "COM0" . call comtsr with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu comtsr From this example, transfer shift register empty is turned on. COMTOE Syntax: COMTOE Use: To determine the status of time-out error. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if time-out error is turned on, a "N" if time-out error is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\comtoe . FOXLIB = "COM0" . call comtoe with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu comtoe From this example, time-out error is turned on. LPTINIT Syntax: LPTINIT Use: To initialize the line printer (LPT). Parameters: LPT0 for lpt1, LPT1 for lpt2, and LPT2 for lpt3. Returns: The first character in the sending parameter will have the status of the line printer. If you did not pass the parameter correctly (e.g. FOXLIB = "ZPT0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\lptinit . FOXLIB = "LPT0" . call lptinit with FOXLIB . ?asc(substr(FOXLIB,1,1)) 144 . rele modu lptinit From this example, the printer status for LPT1 after initialization is ready to print. Below is a table of possible outcomes: 0 = Initialization successful 8 = Offline 40 = Out of paper 72 = I/O error 144 = Printer ready 200 = Printer power off The above values are only valid with IBM and EPSON compatible printers. If you have a different type of printer, you may be able to determine the value specific to your printer. If you are using a non- compatible printer, run LPTINIT under different conditions (e.g. printer on, printer not turned on, etc.). The results you obtain may allow you to build a table of outcomes for your particular printer. When you test LPTINIT using a non- IBM/EPSON compatible printer, make sure all of your FOX application files are closed. Otherwise, you may get unwanted results! LPTSTAT Syntax: LPTSTAT Use: To determine the status of the line printer (LPT). Parameters: LPT0 for lpt1, LPT1 for lpt2, and LPT2 for lpt3. Returns: The first character in the sending parameter will have the status of the line printer. If you did not pass the parameter correctly (e.g. FOXLIB = "ZPT0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\lptstat . FOXLIB = "LPT0" . call lptstat with FOXLIB . ?asc(substr(FOXLIB,1,1)) 144 . rele modu lptstat From this example, the status of the LPT1 is printer ready. Below is a table of possible outcomes: 8 = Offline 40 = Out of paper 72 = I/O error 144 = Printer ready 200 = Printer power off The above values are only valid with IBM and EPSON compatible printers. If you have a different type of printer, you may be able to determine the value specific to your printer. If you are using a non- compatible printer, run LPTSTAT under different conditions (e.g. printer on, printer not turned on, etc.). The results you obtain may allow you to build a table of outcomes for your particular printer. When you test LPTINIT using a non- IBM/EPSON compatible printer, make sure all of your FOX application files are closed. Otherwise, you may get unwanted results! MODMDCTS Syntax: MODMDCTS Use: To determine the status of delta clear to send. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if delta clear to send is turned on, a "N" if delta clear to send is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\modmdcts . FOXLIB = "COM0" . call modmdcts with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu modmdcts From this example, delta clear to send is turned on. MODMDDSR Syntax: MODMDDSR Use: To determine the status of delta data set ready. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if delta data set ready is turned on, a "N" if delta data set ready is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\modmddsr . FOXLIB = "COM0" . call modmddsr with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modmddsr From this example, delta data set ready is turned on. MODMTER Syntax: MODMTER Use: To determine the status of trailing edge ring detector. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if trailing edge ring detector is turned on, a "N" if trailing edge ring detector is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\modmter . FOXLIB = "COM0" . call modmter with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu modmter From this example, trailing edge ring detector is turned on. MODMDRLS Syntax: MODMDRLS Use: To determine the status of delta receive line signal detect. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if delta receive line signal detect is turned on, a "N" if delta receive line signal detect is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\modmdrls . FOXLIB = "COM0" . call modmdrls with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu modmdrls From this example, delta receive line signal detect is turned on. MODMCTS Syntax: MODMCTS Use: To determine the status of clear to send. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if clear to send is turned on, a "N" if clear to send is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\modmcts . FOXLIB = "COM0" . call modmcts with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu modmcts From this example, clear to send is turned on. MODMDSR Syntax: MODMDSR Use: To determine the status of data set ready. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if data set ready is turned on, a "N" if data set ready is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\modmdsr . FOXLIB = "COM0" . call modmdsr with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu modmdsr From this example, data set ready is turned on. MODMRI Syntax: MODMRI Use: To determine the status of ring indicator. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if ring indicator is turned on, a "N" if ring indicator is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\modmri . FOXLIB = "COM0" . call modmri with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu modmri From this example, ring indicator is turned on. MODMRLS Syntax: MODMRLS Use: To determine the status of receive line signal detect. Parameters: COM0 for com1, COM1 for com2, COM2 for com3, and COM3 for com4. Returns: The first character in the sending parameter will have a "Y" if receive line signal detect is turned on, a "N" if receive line signal detect is turned off. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOM0"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\modmrls . FOXLIB = "COM0" . call modmrls with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu modmrls From this example, receive line signal detect is turned on. MISCELLANEOUS COMMANDS CDROMDRV Syntax: CDROMDRV Use: To determine the presence of the MS CD-ROM extensions (MSCDEX.exe). If your application is retrieving information from a CD-ROM, you should first see if the extensions are loaded into memory. Parameters: CDROM Returns: The first character in the sending parameter will have a "Y" if the extensions are present in memory, and a "N" if they are not present. If you did not pass the parameter correctly (e.g. FOXLIB = "ZDROM"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\cdromdrv . FOXLIB = "CDROM" . call cdromdrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu cdromdrv From the above example, the CD-ROM extension is present in memory. Example: if substr(FOXLIB,1,1) = "N" @ 1,0 Say "Error! Need MS CD-ROM extensions." @ 2,0 Say "Exit from application, load MS CD-ROM" @ 3,0 Say "extensions, and re-start program." endif Use the above example to warn the computer user if the CD-ROM extensions are not loaded into memory. See: CDROMVER CDROMVER Syntax: CDROMVER Use: To determine the CD-ROM extension version. Parameters: CDROM Returns: The first character in the sending parameter will have the CD-ROM major version number, and the second character in the sending parameter will have the CD- ROM minor version number if the CD-ROM extension module is present in memory. If the CD-ROM extension module is not present in memory, you will get garbage. If you did not pass the parameter correctly (e.g. FOXLIB = "ZDROM"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\cdromdrv . FOXLIB = "CDROM" . call cdromdrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu cdromdrv . load c:\FOXLIB\cdromver . FOXLIB = "CDROM" . call cdromver with FOXLIB . ?asc(substr(FOXLIB,1,1)) . 2 . ?asc(substr(FOXLIB,2,1)) . 10 . rele modu cdromver From the above example, first verify that the CD-ROM extension is present in memory. If it is, determine the CD-ROM extension version number. In this example it is 2.10. See: CDROMDRV CURSCOL Syntax: CURSCOL Use: To determine the column position of the cursor. Parameters: COL Returns: The first character in the sending parameter will have the column position of the cursor. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOL"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\curscol . FOXLIB = "COL" . call curscol with FOXLIB . ?asc(substr(FOXLIB,1,1)) 24 . rele modu curscol From this example, the column position of the cursor is at column 24. See: CURSOR, CURSROW CURSROW Syntax: CURSROW Use: To determine the row position of the cursor. Parameters: ROW Returns: The first character in the sending parameter will have the row position of the cursor. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOL"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\cursrow . FOXLIB = "ROW" . call cursrow with FOXLIB . ?asc(substr(FOXLIB,1,1)) 0 . rele modu cursrow From this example, the row position of the cursor is at row 0. See: CURSOR, CURSCOL CURSOR Syntax: CURSOR Use: To change the size of the cursor. Parameters: L for line, H for half-block, and B for block cursor. Returns: The first character in the sending parameter will have a "Y" if the cursor was changed. If you did not pass the parameter correctly (e.g. FOXLIB = "Z"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\cursor . FOXLIB = "H" . call cursor with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu cursor From this example, the cursor was changed to half block (Ü). See: CURSCOL, CURSROW DAYWEEK Syntax: DAYWEEK Use: To determine the day of the week. Parameters: DAY Returns: The first character in the sending parameter will have the day of the week (0=Sunday, 1=Monday, etc.). If you did not pass the parameter correctly (e.g. FOXLIB = "ZAY"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\dayweek . FOXLIB = "DAY" . call dayweek with FOXLIB . ?asc(substr(FOXLIB,1,1)) 3 . rele modu dayweek From this example, day of the week is Wednesday. Below is a list of all possible outcomes: 0 = Sunday 1 = Monday 2 = Tuesday 3 = Wednesday 4 = Thursday 5 = Friday 6 = Saturday MOUSECTR Syntax: MOUSECTR Use: To determine the status of the left mouse button. Use this command only when you want to test the functionality of the center mouse button. Have the end-user hold down the center mouse button on any non-responsive (i.e. blank area of the screen) section of the computer display. Parameters: MOUSE Returns: The first character in the sending parameter will have a "Y" if the cneter mouse button is down, and a "N" if the center mouse button is not down. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOUSE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mousedrv . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv . load c:\FOXLIB\mousectr . FOXLIB = "MOUSE" . call mousectr with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousectr From this example, the center mouse button is down. See: MOUSEDRV, MOUSETYP, MOUSEVER, MOUSELNG, MOUSERHT, MOUSELFT, MOUSESHW, MOUSEHID Notes: First determine if the mouse driver has been loaded into memory using the FOXLIB command "MOUSEDRV" before using this command. Otherwise, you will get unwanted results. This command only works with FoxPro since it is the only FOX DBMS that comes with mouse support. MOUSEDRV Syntax: MOUSEDRV Use: To determine the presence of the mouse driver. Parameters: MOUSE Returns: The first character in the sending parameter will have a "Y" if the mouse driver is present in memory, and a "N" if it is not present. If you did not pass the parameter correctly (e.g. FOXLIB ="ZOUSE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mousedrv . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv From this example, the mouse driver is present in memory. Example: if substr(FOXLIB,1,1) = "N" @ 1,0 Say "Error! Need mouse driver in memory." @ 2,0 Say "Exit from application, load mouse" @ 3,0 Say "driver into memory, and re-start" @ 4,0 Say "program." endif If your application requires a mouse, first test to see if the mouse driver has been loaded into memory. See: MOUSETYP, MOUSEVER, MOUSELNG, MOUSERHT, MOUSELFT, MOUSESHW, MOUSEHID, MOUSECTR MOUSEHID Syntax: MOUSEHID Use: To remove the mouse pointer from the display. Parameters: MOUSE Returns: Nothing. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOUSE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mousedrv . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv . load c:\FOXLIB\mousehid . FOXLIB = "MOUSE" . call mousehid with FOXLIB . rele modu mousehid From this example, the mouse pointer was removed from the display. See: MOUSEDRV, MOUSETYP, MOUSEVER, MOUSELNG, MOUSERHT, MOUSELFT, MOUSESHW, MOUSECTR Notes: First determine if the mouse driver has been loaded into memory using the FOXLIB command "MOUSEDRV" before using this command. Otherwise, you will get unwanted results. This command only works with FoxPro since it is the only FOX DBMS that comes with mouse support. MOUSELFT Syntax: MOUSELFT Use: To determine the status of the left mouse button. Use this command only when you want to test the functionality of the left mouse button. Have the end-user hold down the left mouse button on any non- responsive (i.e. blank area of the screen) section of the computer display. Parameters: MOUSE Returns: The first character in the sending parameter will have a "Y" if the left mouse button is down, and a "N" if the left mouse button is not down. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOUSE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mousedrv . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv . load c:\FOXLIB\mouselft . FOXLIB = "MOUSE" . call mouselft with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mouselft From this example, the left mouse button is down. See: MOUSEDRV, MOUSETYP, MOUSEVER, MOUSELNG, MOUSERHT, MOUSESHW, MOUSEHID, MOUSECTR Notes: First determine if the mouse driver has been loaded into memory using the FOXLIB command "MOUSEDRV" before using this command. Otherwise, you will get unwanted results. This command only works with FoxPro since it is the only FOX DBMS that comes with mouse support. MOUSELNG Syntax: MOUSELNG Use: To determine the mouse language. Parameters: MOUSE Returns: The first character in the sending parameter will have the language number if the mouse driver is present in memory, and garbage if the mouse driver is not present. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOUSE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mousedrv . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv . load c:\FOXLIB\mouselng . FOXLIB = "MOUSE" . call mouselng with FOXLIB . ?asc(substr(FOXLIB,1,1)) . 0 . rele modu mouselng From this example, the mouse language is English. Below is a table of all possible outcomes. 0 = English 1 = French 2 = Dutch 3 = German 4 = Swedish 5 = Finnish 6 = Spanish 7 = Portuguese 8 = Italian See: MOUSEDRV, MOUSETYP, MOUSEVER, MOUSERHT, MOUSELFT, MOUSESHW, MOUSEHID, MOUSECTR Notes: First determine if the mouse driver has been loaded into memory using the FOXLIB command "MOUSEDRV" before using this command. Otherwise, you will get unwanted results. MOUSERHT Syntax: MOUSERHT Use: To determine the status of the right mouse button. Use this command only when you want to test the functionality of the right mouse button. Have the end-user hold down the right mouse button on any non-responsive (i.e. blank area of the screen) section of the computer display. Parameters: MOUSE Returns: The first character in the sending parameter will have a "Y" if the right mouse button is down, and a "N" if the right mouse button is not down. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOUSE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mousedrv . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv . load c:\FOXLIB\mouserht . FOXLIB = "MOUSE" . call mouserht with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mouserht From this example, the right mouse button is down. See: MOUSEDRV, MOUSETYP, MOUSEVER, MOUSELNG, MOUSELFT, MOUSESHW, MOUSEHID, MOUSECTR Notes: First determine if the mouse driver has been loaded into memory using the FOXLIB command "MOUSEDRV" before using this command. Otherwise, you will get unwanted results. This command only works with FoxPro since it is the only FOX DBMS that comes with mouse support. MOUSESHW Syntax: MOUSESHW Use: To Display the mouse pointer. Parameters: MOUSE Returns: Nothing. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOUSE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mousedrv . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv . load c:\FOXLIB\mouseshw . FOXLIB = "MOUSE" . call mouseshw with FOXLIB . rele modu mouseshw From this example, the mouse pointer is displayed. See: MOUSEDRV, MOUSETYP, MOUSEVER, MOUSELNG, MOUSERHT, MOUSELFT, MOUSEHID, MOUSECTR Notes: First determine if the mouse driver has been loaded into memory using the FOXLIB command "MOUSEDRV" before using this command. Otherwise, you will get unwanted results. This command only works with FoxPro since it is the only FOX DBMS that comes with mouse support. MOUSETYP Syntax: MOUSETYP Use: To determine the mouse type. Parameters: MOUSE Returns: The first character in the sending parameter will have the mouse type if the mouse driver is present in memory, and garbage if the mouse driver is not present. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOUSE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mousedrv . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv . load c:\FOXLIB\mousetyp . FOXLIB = "MOUSE" . call mousetyp with FOXLIB . ?asc(substr(FOXLIB,1,1)) . 2 . rele modu mousetyp From this example, the mouse type is serial mouse. Below is a table of all possible outcomes. 1 = Bus mouse 2 = Serial mouse 3 = InPort mouse 4 = PS/2 mouse 5 = HP mouse See: MOUSEDRV, MOUSEVER, MOUSELNG, MOUSERHT, MOUSELFT, MOUSESHW, MOUSEHID, MOUSECTR Notes: First determine if the mouse driver has been loaded into memory using the FOXLIB command "MOUSEDRV" before using this command. Otherwise, you will get unwanted results. MOUSEVER Syntax: MOUSEVER Use: To determine the mouse version. Parameters: MOUSE Returns: The first character in the sending parameter will have the mouse major version number, and the second character in the sending parameter will have the mouse minor version number if the mouse driver is present in memory. If the mouse driver is not present in memory, you will get garbage. If you did not pass the parameter correctly (e.g. FOXLIB = "ZOUSE"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\mousedrv . FOXLIB = "MOUSE" . call mousedrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu mousedrv . load c:\FOXLIB\mousever . FOXLIB = "MOUSE" . call mousever with FOXLIB . ?asc(substr(FOXLIB,1,1)) . 6 . ?asc(substr(FOXLIB,2,1)) . 36 . rele modu mousever From this example, the mouse version number is 6.36. Please note that our mouse displayed version 6.24 when we executed mouse.com from the DOS prompt. When we used the FOXLIB command MOUSEVER from within FOX it returned version 6.36. See: MOUSEDRV, MOUSETYP, MOUSELNG, MOUSERHT, MOUSELFT, MOUSESHW, MOUSEHID, MOUSECTR Notes: First determine if the mouse driver has been loaded into memory using the FOXLIB command "MOUSEDRV" before using this command. Otherwise, you will get unwanted results. NUMCHAR Syntax: NUMCHAR Use: To determine if the parameter (byte) passed is a character or a number. Parameters: Character or number. Returns: The first character in the sending parameter will have a "C" if the parameter passed is a character, a "N" if the parameter passed is a number. If you did not pass the parameter correctly (e.g. FOXLIB = ""), your sending parameter will be unchanged. Example: . load c:\FOXLIB\numchar . FOXLIB = "A" . call numchar with FOXLIB . ?substr(FOXLIB,1,1) = "C" .T. . rele modu numchar From this example, the parameter passed is a character. Example: . load c:\FOXLIB\numchar . FOXLIB = "0" . call numchar with FOXLIB . ?substr(FOXLIB,1,1) = "N" .T. . rele modu numchar From this example, the parameter passed is a number. PRNTSCRN Syntax: PRNTSCRN Use: To print the ASCII contents on the monitor (screen). Parameters: None Returns: Nothing. Example: . load c:\FOXLIB\prntscrn . call prntscrn . rele modu prntscrn From this example, the ASCII contents on the monitor (screen) are sent to the printer. Notes: Make sure the printer is turned on and is ready to accept the screen output. Otherwise, you could unwanted results. XMSDRV Syntax: XMSDRV Use: To determine the presence of the HIMEM.SYS driver. Parameters: XMSDRV Returns: The first character in the sending parameter will have a "Y" if the driver is present in memory, and a "N" if it is not present. If you did not pass the parameter correctly (e.g. FOXLIB = "ZMSDRV"), your sending parameter will be unchanged. Example: . load c:\FOXLIB\xmsdrv . FOXLIB = "XMSDRV" . call xmsdrv with FOXLIB . ?substr(FOXLIB,1,1) = "Y" .T. . rele modu xmsdrv From this example, the HIMEM.SYS driver is present in memory. BIOSDATE ........... Page 35 CAPSOFF ............ Page 66 CAPSON ............. Page 69 CAPSSTAT ........... Page 60 CDROMDRV ........... Page 98 CDROMVER ........... Page 99 COM1200 ............ Page 74 COM2400 ............ Page 75 COM300 ............. Page 73 COM4800 ............ Page 76 COM9600 ............ Page 77 COMBID ............. Page 83 COMDR .............. Page 79 COMFE .............. Page 82 COMOE .............. Page 80 COMPE .............. Page 81 COMSTAT ............ Page 78 COMTHR ............. Page 84 COMTOE ............. Page 86 COMTSR ............. Page 85 CONVMEM ............ Page 36 CREATDIR ........... Page 23 CURSCOL ............ Page 100 CURSOR ............. Page 102 CURSROW ............ Page 101 DAYWEEK ............ Page 103 DOSVERS ............ Page 24 DRIVERDY ........... Page 25 EXTMEM ............. Page 37 GAMEADAP ........... Page 38 GETATTR ............ Page 27 GETDRIVE ........... Page 26 GETVERFY ........... Page 28 INSSTAT ............ Page 61 LEFTSHFT ........... Page 62 LPTINIT ............ Page 87 LPTSTAT ............ Page 88 MATHCOPR ........... Page 39 MCA ................ Page 40 MODMCTS ............ Page 93 MODMDCTS ........... Page 89 MODMDDSR ........... Page 90 MODMDRLS ........... Page 92 MODMDSR ............ Page 94 MODMRI ............. Page 95 MODMRLS ............ Page 96 MODMTER ............ Page 91 MOUSECTR ........... Page 104 MOUSEDRV ........... Page 105 MOUSEHID ........... Page 106 MOUSELFT ........... Page 107 MOUSELNG ........... Page 108 MOUSERHT ........... Page 109 MOUSESHW ........... Page 110 MOUSETYP ........... Page 111 MOUSEVER ........... Page 112 NODRIVES ........... Page 41 NUMCHAR ............ Page 113 NUMOFF ............. Page 67 NUMON .............. Page 70 NUMSTAT ............ Page 63 PARALLEL ........... Page 55 PC ................. Page 43 PCAT ............... Page 45 PCBUS .............. Page 42 PCCONV ............. Page 48 PCJR ............... Page 46 PCXT ............... Page 44 PCXT286 ............ Page 47 PRNTSCRN ........... Page 114 PS2M30 ............. Page 49 PS2M50 ............. Page 50 PS2M55 ............. Page 51 PS2M60 ............. Page 52 PS2M70 ............. Page 53 PS2M80 ............. Page 54 REALTIME ........... Page 56 REMOVDIR ........... Page 29 RGHTSHFT ........... Page 64 SCRLOFF ............ Page 68 SCRLON ............. Page 71 SCRLSTAT ........... Page 65 SCRNSIZE ........... Page 57 SERIAL ............. Page 58 SETATTR ............ Page 32 SETDIR ............. Page 30 SETDRIVE ........... Page 31 SETVERFY ........... Page 33 XMSDRV ............. Page 115