Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : DB4LIB.ZIP
Filename : DB4LIB.TXT

 
Output of file : DB4LIB.TXT contained in archive : DB4LIB.ZIP










dB4LIB






















By Sparkle Software

A collection of commands for dBASE IV and dBASE III PLUS







dB4LIB Version 1.0 Copyright (C) Sparkle Software 1990
All Rights Reserved.
dB4LIB is a trademark of Sparkle Software.
dBASE III PLUS and dBASE IV are registered trademarks of Ashton-Tate
Corporation.







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 dB4LIB "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.

dB4LIB 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 dB4LIB and continue to use dB4LIB 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 dB4LIB must register and pay for their copies of dB4LIB
within 30 days of first use or their license is withdrawn. Site-License
arrangements may be made by contacting Sparkle Software.

Anyone distributing dB4LIB for any kind of remuneration must first contact
Sparkle Software for authorization.

You are encouraged to pass a copy of dB4LIB 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 dBASE
COMMANDS, SAMPLE dBASE PROGRAM FILES, A PRINTED MANUAL, AND A 16 PAGE
TUTORIAL SHOWING YOU HOW TO CREATE A dBASE COMMAND USING THE MICROSOFT MACRO
ASSEMBLER AND DOS'S DEBUG!

When you register dB4LIB, 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.































dB4LIB 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.
dBASE, dBASE III PLUS and dBASE IV are registered trademarks of Ashton-Tate
Corporation.
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, 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 dB4LIB *****

INTRODUCTION ........................................ Page 9-10
HARDWARE/SOFTWARE REQUIREMENTS & PACKAGE CONTENTS ... Page 11
INSTALLING dB4LIB ................................... Page 12-13
REGISTRATION & SOFTWARE SUPPORT ..................... Pages 14-15
USING dB4LIB ........................................ Pages 16-17
EXAMPLES ............................................ Page 18
IMPORTANT! .......................................... Page 19
QUICK START ......................................... Page 20

DOS COMMANDS:
CREATE SUBDIRECTORY ................................. Page 22
DOS VERSION ......................................... Page 23
DRIVE READY ......................................... Page 24
GET CURRENT DRIVE ................................... Page 25
GET FILE ATTRIBUTE .................................. Page 26
GET VERIFY FLAG ..................................... Page 27
REMOVE SUBDIRECTORY ................................. Page 28
SET DIRECTORY ....................................... Page 29
SET DRIVE ........................................... Page 30
SET FILE ATTRIBUTE .................................. Page 31
SET VERIFY FLAG ..................................... Page 32

EQUIPMENT COMMANDS:
BIOS DATE ........................................... Page 34
CONVENTIONAL MEMORY ................................. Page 35
EXTENDED MEMORY ..................................... Page 36
GAME ADAPTER ........................................ Page 37
MATH COPROCESSOR .................................... Page 38
MICRO CHANNEL ARCHITECTURE .......................... Page 39
NUMBER OF INSTALLED DRIVES .......................... Page 40
PC BUS .............................................. Page 41
PC TYPE PC .......................................... Page 42
PC TYPE XT .......................................... Page 43
PC TYPE AT .......................................... Page 44
PC TYPE PCjr ........................................ Page 45
PC TYPE PC/XT 286 ................................... Page 46
PC TYPE PC CONVERTIBLE .............................. Page 47
PC TYPE PS/2 MODEL 30 ............................... Page 48
PC TYPE PS/2 MODEL 50 ............................... Page 49
PC TYPE PS/2 MODEL 55 ............................... Page 50
PC TYPE PS/2 MODEL 60 ............................... Page 51
PC TYPE PS/2 MODEL 70 ............................... Page 52
PC TYPE PS/2 MODEL 80 ............................... Page 53
PARALLEL PORT ....................................... Page 54
REAL-TIME CLOCK ..................................... Page 55
SERIAL PORT ......................................... Page 56




TABLE OF CONTENTS

KEYBOARD COMMANDS:
CAPS LOCK KEY STATUS ................................ Page 58
INSERT KEY STATUS ................................... Page 59
LEFT SHIFT KEY STATUS ............................... Page 60
NUM LOCK KEY STATUS ................................. Page 61
RIGHT SHIFT KEY STATUS .............................. Page 62
SCROLL LOCK KEY STATUS .............................. Page 63
SET CAPS LOCK KEY OFF ............................... Page 64
SET NUM LOCK KEY OFF ................................ Page 65
SET SCROLL LOCK KEY OFF ............................. Page 66
SET CAPS LOCK KEY ON ................................ Page 67
SET NUM LOCK KEY ON ................................. Page 68
SET SCROLL LOCK KEY ON .............................. Page 69

COMMUNICATION COMMANDS:
INITIALIZE COMMUNICATIONS LINE AT 300 BAUD .......... Page 71
INITIALIZE COMMUNICATIONS LINE AT 1200 BAUD ......... Page 72
INITIALIZE COMMUNICATIONS LINE AT 2400 BAUD ......... Page 73
INITIALIZE COMMUNICATIONS LINE AT 4800 BAUD ......... Page 74
INITIALIZE COMMUNICATIONS LINE AT 9600 BAUD ......... Page 75
COM PORT STATUS ..................................... Page 76
COMMUNICATIONS PORT DATA READY STATUS ............... Page 77
COMMUNICATIONS PORT OVERRUN ERROR STATUS ............ Page 78
COMMUNICATIONS PORT PARITY ERROR STATUS ............. Page 79
COMMUNICATIONS PORT FRAMING ERROR STATUS ............ Page 80
COMMUNICATIONS PORT BREAK INTERRUPT STATUS .......... Page 81
COMMUNICATIONS PORT THR STATUS ...................... Page 82
COMMUNICATIONS PORT TSR STATUS ...................... Page 83
COMMUNICATIONS PORT TIME-OUT ERROR STATUS ........... Page 84
INITIALIZE LINE PRINTER ............................. Page 85
LINE PRINTER STATUS ................................. Page 86
MODEM DELTA CLEAR TO SEND STATUS..................... Page 87
MODEM DELTA DATA SET READY STATUS ................... Page 88
MODEM TRAILING EDGE RING DETECTOR STATUS ............ Page 89
MODEM DELTA RECEIVE LINE SIGNAL DETECT STATUS ....... Page 90
MODEM CLEAR TO SEND STATUS .......................... Page 91
MODEM DATA SET READY STATUS ......................... Page 92
MODEM RING INDICATOR STATUS ......................... Page 93
MODEM RECEIVE LINE SIGNAL DETECT STATUS ............. Page 94













TABLE OF CONTENTS

MISCELLANEOUS COMMANDS:
CDROM DRIVER ........................................ Page 96
CDROM VERSION ....................................... Page 97
CURSOR COLUMN POSITION .............................. Page 98
CURSOR ROW POSITION ................................. Page 99

DAY OF THE WEEK ..................................... Page 100
MOUSE DRIVER ........................................ Page 101
MOUSE LANGUAGE ...................................... Page 102
MOUSE TYPE .......................................... Page 103
MOUSE VERSION ....................................... Page 104
NUMBER OR CHARACTER ................................. Page 105
PRINT SCREEN ........................................ Page 106
XMS DRIVER .......................................... Page 107

INDEX ............................................... Page 108-109





































INTRODUCTION

dB4LIB is a command library that will allow you to perform low level commands
from the dot prompt and from within your favorite programs (i.e. dBASE IV and
dBASE III PLUS). Also, dB4LIB version 1.0 commands can be moved from one
flavor of dBASE (i.e. dBASE IV version 1.1 and dBASE III PLUS version 1.1)
to another without any modification.

Please note that you will see the word dBASE being used throughout this
manual. dBASE refers to dBASE IV and dBASE III PLUS.

dB4LIB was developed for the following reasons:

(1) To help you support your dBASE application. For example, if you include
the GETPCENV.PRG program (included on the dB4LIB 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 dBASE
applications when you are talking with your client on the phone.

(2) To help you install your dBASE application. For example, if you use the
INSTALL.PRG program (included on the dB4LIB system disk when you register) in
your dBASE 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 dBASE 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
dBASE application.

dB4LIB will not solve all of your problems, but it will give you an edge in
supporting your dBASE programs.

You may already have noticed that the examples in this manual are from the
dot prompt. I did this to show you how easy the dB4LIB commands are to use.
If you are a beginner to dBASE, performing dB4LIB commands from the dot
prompt or Foxpro command window will be easier to grasp. The intermediate
and advanced dBASE users can use all of the dB4LIB commands in their
programs.

Also, the dB4LIB commands will become very useful to the dBASE user for the
following reasons:

(1) When executing DOS commands from the dot prompt or FoxPro command window,
the dBASE RUN command requires additional memory than dB4LIB 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 dB4LIB 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 dB4LIB commands (e.g. nodrives, mousedrv, mathcopr, xmsdrv,
cursor, printer status, etc.) are not accessible from the dBASE RUN command.
















































HARDWARE/SOFTWARE REQUIREMENTS & PACKAGE CONTENTS

In order to use dB4LIB, you must have an IBM PC or 100% compatible, 640k of
RAM, a 3.5" or 5.25" diskette drive, hard disk, dBASE IV, dBASE III PLUS, and
MS-DOS version 3.1 or higher (some of the dB4LIB commands will work with DOS
version 2.1. When Microsoft enhanced MS-DOS in later versions, e.g.
Microsoft CD-ROM extensions, dB4LIB requires MS-DOS 3.1 or greater).

The dB4LIB software package includes the following three items:

Command library that includes the binary files (e.g. nodrives.bin) to be
loaded and called into your dBASE applications.

ASCII manual.

Registration form.






































INSTALLING dB4LIB for both 30-day trial and registered versions

To install dB4LIB on your hard disk, perform the following steps:

1. Create a subdirectory on your hard disk with the name dB4LIB.

For example, we'll assume you'll be creating a subdirectory on drive C on
your hard disk. Type the following ->

MD dB4LIB

and press the return key.

2. Place the dB4LIB diskette into your floppy diskette drive, and then type
the letter of the drive where you just placed the dB4LIB diskette.

For example, if you placed the dB4LIB diskette into drive A, type the
following ->

A:

and press the return key.

3. Copy all of the dB4LIB program files from drive A into the dB4LIB
subdirectory.

For example, type the following ->

cd\prg

copy *.prg c:\dB4LIB

and press the return key.

4. Copy all of the dB4LIB command files from drive A into the dB4LIB
subdirectory.

For example, type the following ->

cd\bin

copy *.bin c:\dB4LIB

and press the return key.










5. Copy all of the dB4LIB source code files from drive A into the dB4LIB
subdirectory.

For example, type the following ->

cd\asm

copy *.asm c:\dB4LIB

and press the return key.

That's all there is to installing dB4LIB 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 dB4LIB. BY REGISTRATING YOUR
SOFTWARE, YOU WILL RECEIVE THE ASSEMBLY LANGUAGE SOURCE CODE FOR ALL dBASE
COMMANDS, SAMPLE dBASE PROGRAM FILES (E.G. GETPCENV.PRG), A PRINTED MANUAL,
AND A 16 PAGE TUTORIAL SHOWING YOU HOW TO CREATE A dBASE 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 dB4LIB. Please understand
that I cannot answer questions concerning how to program in dBASE 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 Db4LIB commands commercially (e.g.
consulting, software development, software testing, etc.) you must register
Db4LIB 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:_________________________
dBASE language you are currently using (please check):
dBASE IV___ dBASE III PLUS___
dB4LIB version:___



































Using dB4LIB in your applications

You can execute the dB4LIB commands from the dot prompt, FoxPro command
window, and from within your dBASE programs. This is a summary for using the
dB4LIB commands included on the dB4LIB diskette. Please refer to each
individual command located in this manual for specific information.

In order to use dB4LIB, you must have dBASE loaded in memory and be your
foreground (active) application.

I will use the NODRIVES dB4LIB command for an example. 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:\dB4LIB\nodrives
. dB4LIB = "NODRIVES"
. call nodrives with dB4LIB
. ?asc(substr(dB4LIB,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 dB4LIB COMMAND, I.E. DO
NOT SEND A PARAMETER OTHER THAN WHAT IS ASKED OF YOU FOR EACH dB4LIB COMMAND.

(3) We called the NODRIVES command with the parameter "NODRIVES" (You can
pass character parameters to dB4LIB 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 dB4LIB command returns a value, you may have to convert the value to
an ASCII code using just two dBASE functions - SUBSTR and ASC. The SUBSTR
and ASC functions are included with your dBASE 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
. dB4LIB = "NODRIVES"
. call nodrives with dB4LIB
. ?substr(dB4LIB,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(dB4LIB,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 dBASE manual for
questions using the SUBSTR and ASC functions.






































EXAMPLES for registration version

I included the following dBASE programs on the registered dB4LIB diskette:

GETPCENV.PRG is a simple dBASE 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 dBASE
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 dBASE program. Again, You will want to
modify this file to suit your needs. This routine can make installing your
dBASE application easier.

COMMANDS.PRG is a dBASE 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 dBASE source code.

































IMPORTANT!

1. MAKE SURE YOU RELEASE A dB4LIB COMMAND FROM MEMORY USING THE dBASE
"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
dBASE.

Example: . load c:\dB4LIB\mousedrv
. dB4LIB = "MOUSE"
. call mousedrv with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
ÄÄÄÄÄÄÄÄÄ> . rele modu mousedrv

2. NEVER SEND A PARAMETER OTHER THAN WHAT IS SPECIFIED IN THE dB4LIB
COMMAND. OTHERWISE, YOU COULD GET UNWANTED AND UNPREDICTABLE RESULTS. BELOW
IS THE INCORRECT WAY TO PASS THE PARAMETER "MOUSE" USING THE MOUSE DRIVER
dB4LIB COMMAND.

Example: . load c:\dB4LIB\mousedrv
ÄÄÄÄÄÄÄÄÄ> . dB4LIB = "MICKEYMOUSE"
. call mousedrv with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu mousedrv

Below is the CORRECT way to pass the parameter "MOUSE" using the mouse driver
dB4LIB command.

Example: . load c:\dB4LIB\mousedrv
ÄÄÄÄÄÄÄÄÄ> . dB4LIB = "MOUSE"
. call mousedrv with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu mousedrv

Please refer to your dBASE 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 dB4LIB COMMANDS.












QUICK START for registered version

If you have installed dB4LIB correctly to drive "C" of your hard disk, you
can execute the GETPCENV.PRG program that came on your dB4LIB 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. dB4LIB =
"\backup"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\creatdir
. dB4LIB = "C:\BACKUP"
. call creatdir with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu creatdir

From this example, the subdirectory C:\BACKUP was
created.

Example: if substr(dB4LIB,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. dB4LIB = "ZOS"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\dosvers
. dB4LIB = "DOS"
. call dosvers with dB4LIB
. ?asc(substr(dB4LIB,1,1))
3
. ?asc(substr(dB4LIB,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
dB4LIB = "DOS"
call dosvers with dB4LIB
IF asc(substr(dB4LIB,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(dB4LIB,1,1)) = 3 .and.
asc(substr(dB4LIB,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. dB4LIB = "/"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\driverdy
. dB4LIB = "B"
. call driverdy with dB4LIB
. ?substr(dB4LIB,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.
dB4LIB = "ZETDRIVE"), your sending parameter will
be unchanged.

Example: . load c:\dB4LIB\getdrive
. dB4LIB = "GETDRIVE"
. call getdrive with dB4LIB
. ?substr(dB4LIB,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.
\dBASE\dBASE.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. dB4LIB = "\dBASE\"),
your sending parameter will be unchanged.


Example: . load c:\dB4LIB\getattr
. dB4LIB = "\IO.SYS"
. call getattr with dB4LIB
. ?asc(substr(dB4LIB,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. dB4LIB = "ZETVERIFY"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\getverfy
. dB4LIB = "GETVERIFY"
. call getverfy with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu getverfy

From this example, verify is on. Having verify
on can dramatically slow down your dBASE
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. dB4LIB =
"\backup"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\removdir
. dB4LIB = "C:\BACKUP"
. call removdir with dB4LIB
. ?substr(dB4LIB,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. dB4LIB
= "\backup"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\setdir
. dB4LIB = "C:\BACKUP"
. call setdir with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu setdir

From this example, the subdirectory was set to
c"\backup."

Example: if substr(dB4LIB,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 dB4LIB
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. dB4LIB = "/"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\setdrive
. dB4LIB = "B"
. call setdrive with dB4LIB
. ?substr(dB4LIB,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. \dBASE\dBASE.EXE,!). You do not
include the drive letter, but you must include the
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. dB4LIB =
"\dBASE\"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\setattr
. dB4LIB = "\dBASE\MIKE.TXT,!"
. call setattr with dB4LIB
. ?substr(dB4LIB,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:
. dB4LIB = "\dBASE\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. dB4LIB = "Z"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\setverfy
. dB4LIB = "0"
. call setverfy with dB4LIB
. ?substr(dB4LIB,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 dB4LIB parameter
will have the date of the ROM BIOS. If you did not
pass the parameter correctly (e.g. dB4LIB =
"ZIOSDATE"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\biosdate
. dB4LIB = "BIOSDATE"
. call biosdate with dB4LIB
. ?dB4LIB
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. dB4LIB =
"ZONV"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\convmem
. dB4LIB = "CONV"
. call convmem with dB4LIB
. ?substr(dB4LIB,1,3)
640
. rele modu convmem

From this example, there is 640K of conventional
memory installed on the computer system.

Example: if val(substr(dB4LIB,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. dB4LIB = "ZXTMEM"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\extmem
. dB4LIB = "EXTMEM"
. call extmem with dB4LIB
. ?RTRIM(dB4LIB)
3072
. rele modu extmem

From this example, there is 3072K of extended
memory installed on the computer system. Notice the
dBASE 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. dB4LIB = "ZAME"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\gameadap
. dB4LIB = "GAME"
. call gameadap with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZATH"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\mathcopr
. dB4LIB = "MATH"
. call mathcopr with dB4LIB
. ?substr(dB4LIB,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. dB4LIB =
"ZCA"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\mca
. dB4LIB = "MCA"
. call mca with dB4LIB
. ?substr(dB4LIB,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. dB4LIB
= "ZODRIVES"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\nodrives
. dB4LIB = "NODRIVES"
. call nodrives with dB4LIB
. ?asc(substr(dB4LIB,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. dB4LIB = "ZCBUS"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\pcbus
. dB4LIB = "PCBUS"
. call pcbus with dB4LIB
. ?substr(dB4LIB,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. dB4LIB
= "ZC"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\pc
. dB4LIB = "PC"
. call pc with dB4LIB
. ?substr(dB4LIB,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.
dB4LIB = "ZCXT"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\pcxt
. dB4LIB = "PCXT"
. call pcxt with dB4LIB
. ?substr(dB4LIB,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.
dB4LIB = "ZCAT"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\pcat
. dB4LIB = "PCAT"
. call pcat with dB4LIB
. ?substr(dB4LIB,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.
dB4LIB = "ZCJR"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\pcjr
. dB4LIB = "PCJR"
. call pcjr with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZCXT286"), your sending parameter
will be unchanged.

Example: . load c:\dB4LIB\pcxt286
. dB4LIB = "PCXT286"
. call pcxt286 with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZCCONV"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\pcconv
. dB4LIB = "PCCONV"
. call pcconv with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZS2M30"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\ps2m30
. dB4LIB = "PS2M30"
. call ps2m30 with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZS2M50"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\ps2m50
. dB4LIB = "PS2M50"
. call ps2m50 with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZS2M55"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\ps2m55
. dB4LIB = "PS2M55"
. call ps2m55 with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZS2M60"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\ps2m60
. dB4LIB = "PS2M60"
. call ps2m60 with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZS2M70"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\ps2m70
. dB4LIB = "PS2M70"
. call ps2m70 with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZS2M80"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\ps2m80

. dB4LIB = "PS2M80"
. call ps2m80 with dB4LIB
. ?substr(dB4LIB,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. dB4LIB =
"ZARALLEL"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\parallel
. dB4LIB = "PARALLEL"
. call parallel with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZEALTIME"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\realtime
. dB4LIB = "REALTIME"
. call realtime with dB4LIB
. ?substr(dB4LIB,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.




























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. dB4LIB = "ZERIAL"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\serial
. dB4LIB = "SERIAL"
. call serial with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZAPS"), your sending parameter
will be unchanged.

Example: . load c:\dB4LIB\capsstat
. dB4LIB = "CAPS"
. call capsstat with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZNS"), your sending parameter will
be unchanged.

Example: . load c:\dB4LIB\insstat
. dB4LIB = "INS"
. call insstat with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZEFT"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\leftshft
. dB4LIB = "LEFT"
. call leftshft with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZUM"), your sending parameter will
be unchanged.

Example: . load c:\dB4LIB\numstat
. dB4LIB = "NUM"
. call numstat with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZIGHT"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\rghtshft
. dB4LIB = "RIGHT"
. call rghtshft with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZCRL"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\scrlstat
. dB4LIB = "SCRL"
. call scrlstat with dB4LIB
. ?substr(dB4LIB,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
dB4LIB parameter will be unchanged.

Example: . load c:\dB4LIB\capsoff
. dB4LIB = "CAPS"
. call capsoff with dB4LIB
. 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. dB4LIB = "ZUM"), your
dB4LIB parameter will be unchanged.

Example: . load c:\dB4LIB\numoff
. dB4LIB = "NUM"
. call numoff with dB4LIB
. 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. dB4LIB = "ZCRL"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\scrloff
. dB4LIB = "SCRL"
. call scrloff with dB4LIB
. 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. dB4LIB = "ZAPS"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\capson
. dB4LIB = "CAPS"
. call capson with dB4LIB
. 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. dB4LIB = "ZUM"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\numon
. dB4LIB = "NUM"
. call numon with dB4LIB
. 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:\dB4LIB\scrlon
. dB4LIB = "SCRL"
. call scrlon with dB4LIB
. 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 dB4LIB 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. dB4LIB = "Z,0"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\com300
. dB4LIB = "A,0"
. call com300 with dB4LIB
. ?substr(dB4LIB,1,1) = "A"
.F.
. ?asc(substr(dB4LIB,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 dB4LIB 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. dB4LIB = "Z,0"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\com1200
. dB4LIB = "1,0"
. call com1200 with dB4LIB
. ?substr(dB4LIB,1,1) = "A"
.F.
. ?asc(substr(dB4LIB,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 dB4LIB 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. dB4LIB = "Z,0"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\com2400
. dB4LIB = "A,0"
. call com2400 with dB4LIB
. ?substr(dB4LIB,1,1) = "A"
.F.
. ?asc(substr(dB4LIB,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 dB4LIB 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. dB4LIB = "Z,0"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\com4800
. dB4LIB = "A,0"
. call com4800 with dB4LIB
. ?substr(dB4LIB,1,1) = "A"
.F.
. ?asc(substr(dB4LIB,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 dB4LIB 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. dB4LIB = "Z,0"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\com9600
. dB4LIB = "A,0"
. call com9600 with dB4LIB
. ?substr(dB4LIB,1,1) = "A"
.F.
. ?asc(substr(dB4LIB,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. dB4LIB
= "ZOM0"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\comstat
. dB4LIB = "COM0"
. call comstat with dB4LIB
. ?asc(substr(dB4LIB,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. dB4LIB = "ZOM0"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\comdr
. dB4LIB = "COM0"
. call comdr with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\comoe
. dB4LIB = "COM0"
. call comoe with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\compe
. dB4LIB = "COM0"
. call compe with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\comfe
. dB4LIB = "COM0"
. call comfe with dB4LIB
. ?substr(dB4LIB,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.
dB4LIB = "ZOM0"), your sending parameter will
be unchanged.

Example: . load c:\dB4LIB\combid
. dB4LIB = "COM0"
. call combid with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\comthr
. dB4LIB = "COM0"
. call comthr with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\comtsr
. dB4LIB = "COM0"
. call comtsr with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"),
your sending parameter will be unchanged.

Example: . load c:\dB4LIB\comtoe
. dB4LIB = "COM0"
. call comtoe with dB4LIB
. ?substr(dB4LIB,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. dB4LIB =
"ZPT0"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\lptinit
. dB4LIB = "LPT0"
. call lptinit with dB4LIB
. ?asc(substr(dB4LIB,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
dBASE 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. dB4LIB =
"ZPT0"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\lptstat
. dB4LIB = "LPT0"
. call lptstat with dB4LIB
. ?asc(substr(dB4LIB,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
dBASE 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. dB4LIB =
"ZOM0"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\modmdcts
. dB4LIB = "COM0"
. call modmdcts with dB4LIB
. ?substr(dB4LIB,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. dB4LIB
= "ZOM0"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\modmddsr
. dB4LIB = "COM0"
. call modmddsr with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"), your sending parameter
will be unchanged.

Example: . load c:\dB4LIB\modmter
. dB4LIB = "COM0"
. call modmter with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\modmdrls
. dB4LIB = "COM0"
. call modmdrls with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\modmcts
. dB4LIB = "COM0"
. call modmcts with dB4LIB
. ?substr(dB4LIB,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. dB4LIB =
"ZOM0"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\modmdsr
. dB4LIB = "COM0"
. call modmdsr with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"),
your sending parameter will be unchanged.

Example: . load c:\dB4LIB\modmri
. dB4LIB = "COM0"
. call modmri with dB4LIB
. ?substr(dB4LIB,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. dB4LIB = "ZOM0"), your sending parameter
will be unchanged.

Example: . load c:\dB4LIB\modmrls
. dB4LIB = "COM0"
. call modmrls with dB4LIB
. ?substr(dB4LIB,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. dB4LIB =
"ZDROM"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\cdromdrv
. dB4LIB = "CDROM"
. call cdromdrv with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu cdromdrv

From the above example, the CD-ROM extension is
present in memory.

Example: if substr(dB4LIB,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. dB4LIB = "ZDROM"), your sending
parameter will be unchanged.

Example: . load c:\dB4LIB\cdromdrv
. dB4LIB = "CDROM"
. call cdromdrv with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu cdromdrv

. load c:\dB4LIB\cdromver
. dB4LIB = "CDROM"
. call cdromver with dB4LIB
. ?asc(substr(dB4LIB,1,1))
. 2
. ?asc(substr(dB4LIB,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. dB4LIB =
"ZOL"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\curscol
. dB4LIB = "COL"
. call curscol with dB4LIB
. ?asc(substr(dB4LIB,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. dB4LIB =
"ZOL"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\cursrow
. dB4LIB = "ROW"
. call cursrow with dB4LIB
. ?asc(substr(dB4LIB,1,1))
0
. rele modu cursrow

From this example, the row position of the cursor
is at row 0.

See: CURSOR, CURSCOL





























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.
dB4LIB = "ZAY"), your sending parameter will be
unchanged.

Example: . load c:\dB4LIB\dayweek
. dB4LIB = "DAY"
. call dayweek with dB4LIB
. ?asc(substr(dB4LIB,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





















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. dB4LIB
="ZOUSE"), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\mousedrv
. dB4LIB = "MOUSE"
. call mousedrv with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu mousedrv

From this example, the mouse driver is present in
memory.

Example: if substr(dB4LIB,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

















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. dB4LIB = "ZOUSE"), your sending
parameter will be unchanged.

Example:
. load c:\dB4LIB\mousedrv
. dB4LIB = "MOUSE"
. call mousedrv with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu mousedrv

. load c:\dB4LIB\mouselng
. dB4LIB = "MOUSE"
. call mouselng with dB4LIB
. ?asc(substr(dB4LIB,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 dB4LIB command "MOUSEDRV"
before using this command. Otherwise, you will get
unwanted results.



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. dB4LIB = "ZOUSE"), your sending
parameter will be unchanged.

Example:
. load c:\dB4LIB\mousedrv
. dB4LIB = "MOUSE"
. call mousedrv with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu mousedrv

. load c:\dB4LIB\mousetyp
. dB4LIB = "MOUSE"
. call mousetyp with dB4LIB
. ?asc(substr(dB4LIB,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 dB4LIB 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. dB4LIB =
"ZOUSE"), your sending parameter will be unchanged.

Example:
. load c:\dB4LIB\mousedrv
. dB4LIB = "MOUSE"
. call mousedrv with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu mousedrv

. load c:\dB4LIB\mousever
. dB4LIB = "MOUSE"
. call mousever with dB4LIB
. ?asc(substr(dB4LIB,1,1))
. 6
. ?asc(substr(dB4LIB,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 dB4LIB command MOUSEVER from
within dBASE 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 dB4LIB 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. dB4LIB
= ""), your sending parameter will be unchanged.

Example: . load c:\dB4LIB\numchar
. dB4LIB = "A"
. call numchar with dB4LIB
. ?substr(dB4LIB,1,1) = "C"
.T.
. rele modu numchar

From this example, the parameter passed is a
character.

Example: . load c:\dB4LIB\numchar
. dB4LIB = "0"
. call numchar with dB4LIB
. ?substr(dB4LIB,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:\dB4LIB\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. dB4LIB = "ZMSDRV"), your
sending parameter will be unchanged.

Example: . load c:\dB4LIB\xmsdrv
. dB4LIB = "XMSDRV"
. call xmsdrv with dB4LIB
. ?substr(dB4LIB,1,1) = "Y"
.T.
. rele modu xmsdrv

From this example, the HIMEM.SYS driver is present
in memory.






























BIOSDATE ........... Page 34
CAPSOFF ............ Page 64
CAPSON ............. Page 67
CAPSSTAT ........... Page 58
CDROMDRV ........... Page 96
CDROMVER ........... Page 97
COM1200 ............ Page 72
COM2400 ............ Page 73
COM300 ............. Page 71
COM4800 ............ Page 74
COM9600 ............ Page 75
COMBID ............. Page 81
COMDR .............. Page 77
COMFE .............. Page 80
COMOE .............. Page 78
COMPE .............. Page 79
COMSTAT ............ Page 76
COMTHR ............. Page 82
COMTOE ............. Page 84
COMTSR ............. Page 83
CONVMEM ............ Page 35
CREATDIR ........... Page 22
CURSCOL ............ Page 98
CURSROW ............ Page 99
DAYWEEK ............ Page 100
DOSVERS ............ Page 23
DRIVERDY ........... Page 24
EXTMEM ............. Page 36
GAMEADAP ........... Page 37
GETATTR ............ Page 26
GETDRIVE ........... Page 25
GETVERFY ........... Page 27
INSSTAT ............ Page 59
LEFTSHFT ........... Page 60
LPTINIT ............ Page 85
LPTSTAT ............ Page 86
MATHCOPR ........... Page 38
MCA ................ Page 39
MODMCTS ............ Page 91
MODMDCTS ........... Page 87
MODMDDSR ........... Page 88
MODMDRLS ........... Page 90
MODMDSR ............ Page 92
MODMRI ............. Page 93
MODMRLS ............ Page 94
MODMTER ............ Page 89
MOUSEDRV ........... Page 101
MOUSELNG ........... Page 102
MOUSETYP ........... Page 103
MOUSEVER ........... Page 105
NODRIVES ........... Page 40
NUMCHAR ............ Page 106
NUMOFF ............. Page 65
NUMON .............. Page 68
NUMSTAT ............ Page 61
PARALLEL ........... Page 54
PC ................. Page 42
PCAT ............... Page 44
PCBUS .............. Page 41
PCCONV ............. Page 47
PCJR ............... Page 45
PCXT ............... Page 43
PCXT286 ............ Page 46
PRNTSCRN ........... Page 106
PS2M30 ............. Page 48
PS2M50 ............. Page 49
PS2M55 ............. Page 50
PS2M60 ............. Page 51
PS2M70 ............. Page 52
PS2M80 ............. Page 53
REALTIME ........... Page 55
REMOVDIR ........... Page 28
RGHTSHFT ........... Page 62
SCRLOFF ............ Page 66
SCRLON ............. Page 69
SCRLSTAT ........... Page 63
SERIAL ............. Page 56
SETATTR ............ Page 31
SETDIR ............. Page 29
SETDRIVE ........... Page 30
SETVERFY ........... Page 32
XMSDRV ............. Page 107