home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windoware
/
WINDOWARE_1_6.iso
/
winutil
/
pbtool2i
/
pbtools.doc
< prev
next >
Wrap
Text File
|
1991-06-02
|
80KB
|
1,611 lines
PB Tools 2.0
Programmer's Toolkit for PowerBASIC 2.1x
Copyright (c) 1990 by Dave Navarro, Jr., All Rights Reserved
Shareware Release Documentation
About PB Tools:
PB Tools is a group of PowerBASIC UNIT files of routines
to give PowerBASIC programmer's advanced routines for
windowing, DOS I/O, keyboard input, system identification,
and much more. PB Tools contains over 100 routines fully
tested for inclusion in your own programs.
PB Tools is a shareware product. Shareware means that
you as a user may use it for a trial period at no cost. If
you continue to use the routines after the trial period, a
registration fee of $30 is suggested. Anyone sending in $50
or more will recieve the latest version of PB Tools, a
printed and bound manual, and my undying gratitude.
Commercial users must pay the registration fee, and all
commercial programs must include, either in documentation, or
displayed in the program itself, the copyright notice for PB
Tools. Note --> Commercial programs are any program that
you write and recieve payment for (including shareware).
All users are encouraged to send in a voluntary contribution
to help with development costs of future versions.
Support:
Support for PB Tools is provided by Dave Navarro, Jr. who may
be contacted at 474 Blossom Hill Rd , San Jose, Ca 95123 or
through The Bard's Lair BBS at 408-225-BARD with your
1200/2400/9600/V32/V42bis/HST modem at 8 bits, No parity, 1
stop bit. Registered users will also have access to a
technical support voice number.
Warranty:
PB Tools is supplied "AS IS", and there is no warranty of any
type expressed or implied, including, without limitation, the
warranties of merchantability and of the fitness for any
purpose. The author assumes no liability for damages, direct
or consequential, which may result from the use of PB Tools.
Author's Note:
These routines were fully tested on several 80286 and 80386
clone systems with monochrome, EGA, and VGA setups, and
operated without any problems. All screen routines worked
fine in CGA mode on my VGA card, but I was unable to obtain
access to a system with an actual CGA card installed,
therefore, there are no routines for handling "snow" caused
by fast screen access in screen writes. I have also left out
error handling routines in most of the library functions and
subs to make the routines run as fast as possible.
I have included the source code to the demo supplied with PB
Tools. I have done my best to add comments to help with the
usage for all commands. If you are still having trouble,
please feel free to contact me, either through US Mail, or
The Bard's Lair BBS. Because of a contractual agreement with
by business partner, I may only provide parts of the original
source to PBTools to registered users. For more information
please contact me.
Many of the DOS and EMS routines require a working knowledge
of interrupts and memory managment. Using a routine
incorrectly can cause unknown results so do not use a routine
that you do not understand.
Acknowledgments:
I would like to thank Richard D. Fothergill and Berry Erick
for their wonderful routines that served as the inspiration
for PB Tools. Many of the routines found in PB Tools are
based on their demo programs and the syntax of the commands
were derived from their documentation.
I would also like to thank Bob Zale for what I feel is the
best BASIC compiler available, and in many cases the best
compiler overall for any language.
I would also like to thank any author who may find a routine
here that looks familiar to them. I have spent countless
hours on the modem downloading QBASIC and TBASIC routines
from BBS's all over the country and modifying them or,
rewriting them based on thier original model.
PB Tools 2.0 Page 4
Table of Contents
About PB Tools . . . . . . . . . . . . . . . . . . . . 2
Support . . . . . . . . . . . . . . . . . . . . . . . 2
Warranty . . . . . . . . . . . . . . . . . . . . . . . 2
Author's Note . . . . . . . . . . . . . . . . . . . . 2
Acknowledgements . . . . . . . . . . . . . . . . . . . 3
How to use PB Tools in your program . . . . . . . . . 7
Command List for all UNIT files . . . . . . . . . . . 8
PB Tools Routines
AddShadow . . . . . . . . . . . . . . . . . . . . . 11
Attr . . . . . . . . . . . . . . . . . . . . . . . . 11
Back . . . . . . . . . . . . . . . . . . . . . . . . 11
Bin2Dec . . . . . . . . . . . . . . . . . . . . . . 12
Box . . . . . . . . . . . . . . . . . . . . . . . . 12
CapsOff . . . . . . . . . . . . . . . . . . . . . . 12
CapsOn . . . . . . . . . . . . . . . . . . . . . . . 13
CapStat . . . . . . . . . . . . . . . . . . . . . . 13
Center . . . . . . . . . . . . . . . . . . . . . . . 13
ChangeWin . . . . . . . . . . . . . . . . . . . . . 13
CheckKey . . . . . . . . . . . . . . . . . . . . . . 13
ClearWin . . . . . . . . . . . . . . . . . . . . . . 14
CloseHandle . . . . . . . . . . . . . . . . . . . . 14
CloseWin . . . . . . . . . . . . . . . . . . . . . . 14
ClrKBD . . . . . . . . . . . . . . . . . . . . . . . 14
Compress . . . . . . . . . . . . . . . . . . . . . . 14
CurBot . . . . . . . . . . . . . . . . . . . . . . . 14
CurDisplay . . . . . . . . . . . . . . . . . . . . . 15
CurTop . . . . . . . . . . . . . . . . . . . . . . . 15
Date2Int . . . . . . . . . . . . . . . . . . . . . . 15
Decrypt . . . . . . . . . . . . . . . . . . . . . . 15
DelChar . . . . . . . . . . . . . . . . . . . . . . 15
Dir2 . . . . . . . . . . . . . . . . . . . . . . . . 16
DrvSpace . . . . . . . . . . . . . . . . . . . . . . 16
EMSFree . . . . . . . . . . . . . . . . . . . . . . 16
EMSHandle. . . . . . . . . . . . . . . . . . . . . . 16
EMSInst . . . . . . . . . . . . . . . . . . . . . . 16
EMSStat . . . . . . . . . . . . . . . . . . . . . . 17
EMSVer . . . . . . . . . . . . . . . . . . . . . . . 17
Encrypt . . . . . . . . . . . . . . . . . . . . . . 17
Evaluate . . . . . . . . . . . . . . . . . . . . . . 17
Exist . . . . . . . . . . . . . . . . . . . . . . . 17
FileCount. . . . . . . . . . . . . . . . . . . . . . 17
Fill . . . . . . . . . . . . . . . . . . . . . . . . 18
FindHand . . . . . . . . . . . . . . . . . . . . . . 18
Fore . . . . . . . . . . . . . . . . . . . . . . . . 18
FreePages. . . . . . . . . . . . . . . . . . . . . . 18
GetAddr . . . . . . . . . . . . . . . . . . . . . . 18
GetDir . . . . . . . . . . . . . . . . . . . . . . . 18
GetDosV . . . . . . . . . . . . . . . . . . . . . . 19
PB Tools 2.0 Page 5
GetHandName . . . . . . . . . . . . . . . . . . . .
GetKey . . . . . . . . . . . . . . . . . . . . . . .
GetRec . . . . . . . . . . . . . . . . . . . . . . .
GetScrn . . . . . . . . . . . . . . . . . . . . . .
Handles . . . . . . . . . . . . . . . . . . . . . .
Hex2Dec . . . . . . . . . . . . . . . . . . . . . .
InitWindos . . . . . . . . . . . . . . . . . . . . .
InsChar . . . . . . . . . . . . . . . . . . . . . .
InsertOff. . . . . . . . . . . . . . . . . . . . . .
InsertOn . . . . . . . . . . . . . . . . . . . . . .
InsStat . . . . . . . . . . . . . . . . . . . . . .
Int2Date . . . . . . . . . . . . . . . . . . . . . .
IsAlpha . . . . . . . . . . . . . . . . . . . . . .
IsAlphaNum . . . . . . . . . . . . . . . . . . . . .
IsAlt . . . . . . . . . . . . . . . . . . . . . . .
IsASCII . . . . . . . . . . . . . . . . . . . . . .
IsCaps . . . . . . . . . . . . . . . . . . . . . . .
IsCtrl . . . . . . . . . . . . . . . . . . . . . . .
IsEMS . . . . . . . . . . . . . . . . . . . . . . .
IsInsert . . . . . . . . . . . . . . . . . . . . . .
IsLShift . . . . . . . . . . . . . . . . . . . . . .
IsMouse . . . . . . . . . . . . . . . . . . . . . .
IsNumKey . . . . . . . . . . . . . . . . . . . . . .
IsNum . . . . . . . . . . . . . . . . . . . . . . .
IsPunc . . . . . . . . . . . . . . . . . . . . . . .
IsRShift . . . . . . . . . . . . . . . . . . . . . .
IsScroll . . . . . . . . . . . . . . . . . . . . . .
LPad . . . . . . . . . . . . . . . . . . . . . . . .
LRotate . . . . . . . . . . . . . . . . . . . . . .
LScroll . . . . . . . . . . . . . . . . . . . . . .
MakeInt . . . . . . . . . . . . . . . . . . . . . .
MapPage . . . . . . . . . . . . . . . . . . . . . .
MaskIn . . . . . . . . . . . . . . . . . . . . . . .
Menu . . . . . . . . . . . . . . . . . . . . . . . .
MLocate . . . . . . . . . . . . . . . . . . . . . .
MouseKey . . . . . . . . . . . . . . . . . . . . . .
MouseOff . . . . . . . . . . . . . . . . . . . . . .
MouseOn . . . . . . . . . . . . . . . . . . . . . .
MouseStat. . . . . . . . . . . . . . . . . . . . . .
MouseWin . . . . . . . . . . . . . . . . . . . . . .
MoveWin . . . . . . . . . . . . . . . . . . . . . .
NoShadow . . . . . . . . . . . . . . . . . . . . . .
NumIn . . . . . . . . . . . . . . . . . . . . . . .
NumOff . . . . . . . . . . . . . . . . . . . . . . .
NumOn . . . . . . . . . . . . . . . . . . . . . . .
NumRecs . . . . . . . . . . . . . . . . . . . . . .
NumStat . . . . . . . . . . . . . . . . . . . . . .
OpenWin . . . . . . . . . . . . . . . . . . . . . .
PageFrame. . . . . . . . . . . . . . . . . . . . . .
PutRec . . . . . . . . . . . . . . . . . . . . . . .
PutScrn . . . . . . . . . . . . . . . . . . . . . .
ReAttr . . . . . . . . . . . . . . . . . . . . . . .
Recolor . . . . . . . . . . . . . . . . . . . . . .
Reverse . . . . . . . . . . . . . . . . . . . . . .
RPad . . . . . . . . . . . . . . . . . . . . . . . .
PB Tools 2.0 Page 6
RRotate . . . . . . . . . . . . . . . . . . . . . .
RScroll . . . . . . . . . . . . . . . . . . . . . .
ScrollDN . . . . . . . . . . . . . . . . . . . . . .
ScrollOff. . . . . . . . . . . . . . . . . . . . . .
ScrollOn . . . . . . . . . . . . . . . . . . . . . .
ScrollStat . . . . . . . . . . . . . . . . . . . . .
ScrollUP . . . . . . . . . . . . . . . . . . . . . .
ScrollWin. . . . . . . . . . . . . . . . . . . . . .
SetHandName. . . . . . . . . . . . . . . . . . . . .
SetText . . . . . . . . . . . . . . . . . . . . . .
ShiftAlpha . . . . . . . . . . . . . . . . . . . . .
StuffKey . . . . . . . . . . . . . . . . . . . . . .
TextEd . . . . . . . . . . . . . . . . . . . . . . .
TextIn . . . . . . . . . . . . . . . . . . . . . . .
Title . . . . . . . . . . . . . . . . . . . . . . .
Trim . . . . . . . . . . . . . . . . . . . . . . . .
UnCompress . . . . . . . . . . . . . . . . . . . . .
UnMapPage . . . . . . . . . . . . . . . . . . . . .
VidAddr . . . . . . . . . . . . . . . . . . . . . .
VidMode . . . . . . . . . . . . . . . . . . . . . .
WinColor . . . . . . . . . . . . . . . . . . . . . .
WPrint . . . . . . . . . . . . . . . . . . . . . . .
WPrintC . . . . . . . . . . . . . . . . . . . . . .
ZoomBox . . . . . . . . . . . . . . . . . . . . . .
PB Tools 2.0 Page 7
How to use PB Tools:
All of the routines in the PB Tools UNIT files have been
declared public so that you may just include the statement for
each function or subroutines in your program, provided you use
the proper syntax for each as described in the examples found
in the description for each routine. Note that all numeric
variables and all numeric functions are integers unless
indicated in the description. This helps to speed the
operation of the routines and your program. To include all of
the routines in PB Tools, just place the following statement
at the top of your program:
$INCLUDE "PBTOOLS.INC"
And make sure that both the PBTOOLS.INC and PB Tools UNIT
files are located in the proper directories as setup by your
editor. The maximum number of windows that PB Tools can
handle is defined by the variable Maxwindows% in the
PBTOOLS.INC file. The default is 15, but you may change it to
whatever you wish. Note however, that the larger the number
used, the more memory is taken by your program so be sure to
only declare the number of windows that you will actually be
using. All text saved from the screen by the window routines
are held in strings, this allows the MoveWin and ChangeWin
routines to more easily rearange the location and content of
your windows. You can change the active window displayed by
changing the CurrentWin% variable, however, the entire window
must be unobstructed on the screen, and the ChangeWin routine
will destroy any data of windows that have been "popped" onto
the screen after the window your changing, so be careful.
Refer to comments in DEMO.BAS, and PBTOOLS.INC for more
help in the actual use of the routines.
Command List Page 8
SCRNIO.PBU
Attr - Calculates a single integer from forground and
background
Back - Calculates background color from a single
integer
CapsOff - Toggles Caps Lock key off
CapsOn - Toggles Caps Lock key on
CapStat - Returns status of Caps Lock key
CheckKey - Returns true if key in keyboard buffer
ClrKBD - Clears keyboard buffer without removing keys
CurDisplay - Returns active display adapter
CurBot - Bottom scanline of cursor
CurTop - Top scanline of cursor
Fill - Fills a box on the screen with a charactor
Fore - Calculates forground color from an integer
GetKey - Get a single key from KB buffer, wait if no key
present
GetScrn - Places any portion of the screen into a string
InsertOff - Toggles insert status off
InsertOn - Toggles insert status on
InsStat - Returns status of INS key
IsAlt - Returns true if ALT key is depressed
IsCaps - Returns true if Caps Lock key is depressed
IsCtrl - Returns true if Ctrl key is depressed
IsInsert - Returns true if INS key is depressed
IsLShift - Returns true if Left Shift key is depressed
IsMouse - Returns number of buttons on mouse if installed
IsNumKey - Returns true if Num Lock key is depressed
IsRShift - Returns true if Right Shift key is depressed
IsScroll - Returns true is Scroll Lock key is depressed
MaskIn - Get masked input from user
MouseKey - Gets a key from KB, mouse movement detected
MLocate - Locate the mouse cursor at any place on screen
MouseOff - Turns mouse cursor off
MouseOn - Turns mouse cursor on
MouseStat - Returns mouse position, and button pressed
MouseWin - Define the window for mouse cursor
NumIn - Get numeric input from user
NumOff - Toggles Num Lock key off
NumOn - Toggles Num Lock Key on
NumStat - Returns status of Num Lock Key
PutScrn - Puts a string created with GetScrn back onto
the screen
ReAttr - Changes the color of any position on the screen
ScrollDN - Scrolls any part of the screen down
ScrollOff - Toggles Scroll Lock key off
ScrollOn - Toggles Scroll Lock key on
ScrollStat - Returns the status of the scroll-lock key
ScrollUP - Scrolls any part of the screen up
SetText - Sets cursor color from single integer
StuffKey - Stuff the KB buffer with up to 16 chars
TextEd - Lets user edit the chars within a line
TextIn - Gets ASCII input from user with editing options
VidAddr - Returns the segment of the video address
VidMode - Returns current video mode
Command List Page 9
TOOL.PBU
Bin2Dec - Converts a binary string to a decimal integer
Center - Centers a string with spaces padded to left and
right
Compress - Compress a text string at about 3:2 ratio
CpuId - Identifies CPU that program is running on
Date2Int - Converts a date to a 2 byte integer
Decrypt - Decrypt a string using a password
DelChar - Delete a charactor within a string at desired
location
Encrypt - Encrypt a string with a password
Evaluate - Evaluate a given expression and return answer
GetAddr - Returns segment and offset of a string
Hex2Dec - Converts a hexadecimal string to a decimal
integer
InsChar - Insert a charactor within a string at desired
location
Int2Date - Converts a 2 byte integer to a valid date
IsAlpha - Returns true if a char is alpha
IsAlphaNum - Returns true is a char is alpha or numeric
IsASCII - Returns true if a char is printable ASCII
IsNum - Returns true if a char is numeric
IsPunc - Returns true if a char is punctuation
LPad - Pad a string to the left with desired char
LRotate - Rotates a string to the left one charactor
MakeInt - Converts two bytes into an integer
Reverse - Reverses all charactors in a string
RPad - Pad a string to the right with desired char
RRotate - Rotates a string to the right one charactor
ShiftAlpha - Shifts uppercase alpha chars over chars
Trim - Trims spaces from both ends of a string
UnCompress - Uncompresses a compressed string
WINDO.PBU
AddShadow - Adds a shadow to current window
Box - Draws a box on the screen
ChangeWin - Changes the size of the current window
ClearWin - Clears the contents of the current window
CloseWin - Closes a previously opened window
InitWindos - Initialize all variables for window routines
Menu - Displays a menu and returns choice from user
MoveWin - Moves the current window in any one of 4
directions
NoShadow - Removes the shadow form the current window
OpenWin - Pops a window on the screen saving whatever is
underneath
ScrollWin - Scrolls the text within the current window in
one of 4 directions
Title - Displays a title in one of 6 positions
WinColor - Changes the text color of the current window
WPrint - Displays a string within the current window
WPrintC - Centers a text string horizontally within
current window
ZoomBox - Explodes a box on the screen
Command List Page 10
DOSIO.PBU
DrvSpace - Double precision integer containing drive space
left
Exist - Returns true if file exists
FileCount - Returns the number of files in dir matching
specification
GetDir - Returns an array containing all filenames
matching spec
GetDosV - Returns current DOS version number
GetDrive - Returns current active drive/partition
GetRec - Retrieves a record from a file
NumRecs - Returns total number of records within a file
PutRec - Put a record into a file
EMSIO.PBU
CloseHandle - Closes a previously allocated EMS Handle
EMSFree - Returns the amount of free EMS memory
EMSHandle - Allocates the requested pages and returns
handle number
EMSInst - Returns the amount of EMS installed
EMSStat - Returns the status of installed EMS
EMSVer - Returns the version number of the EMS driver
FindHand - Returns the file handle number for given name
FreePages - Returns the number of free pages in EMS
GetHandName - Returns 8 charactor name of an EMS handle
Handles - Returns the number of handles used
IsEMS - Returns true if EMS installed
MapPage - Maps logical page to Page Frame
PageFrame - Returns the address segment of the page frame
SetHandName - Assign an 8 charactor name of an EMS handle
UnMapPage - Unmaps current mapped logical frame
Command Usage Page 11
---------------------------------------------------------------------
AddShadow SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Adds a shadow to current window.
Example: CALL AddShadow(Dir%)
Where Dir% = 1 for Drop Left shadow using black spaces
2 for Drop Right using black spaces
3 for Drop Left changing background attributes
4 for Drop Right changing background
attributes
See Also: NoShadow
---------------------------------------------------------------------
Attr FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Calculates a single integer from foreground and background values.
Example: Color%=Attr%(foreground%,background%)
Color Table:
Foreground BackGround
0 - Black Black
1 - Blue Blue
2 - Green Green
3 - Cyan Cyan
4 - Red Red
5 - Magenta Magenta
6 - Brown Brown
7 - White White
8 - Gray
9 - Light Blue
10 - Light Green
11 - Light Cyan
12 - Light Red
13 - Light Magenta
14 - Yellow
15 - Bright White
See Also: Back, Fore, ReAttr, WinColor
---------------------------------------------------------------------
Back FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Calculates the background attribute from a single
foreground/background byte.
Example: Background%=Back%(ColorByte%)
See Also: Attr, Fore, ReAttr, WinColor
Command Usage Page 12
---------------------------------------------------------------------
Bin2Dec FUNCTION TOOL.PBU
---------------------------------------------------------------------
Converts a binary string to a decimal integer.
Example: Binary$="0101"
Dec%=Bin2Dec%(Binary$)
See Also: Hex2Dec
---------------------------------------------------------------------
Box SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Draws a box on the screen with one of 14 borders types.
Example: CALL
Box(Ypos%,Xpos%,Ylen%,Xlen%,Bor%,Shadow%,BorCol%,TextCol%)
Where Ypos% = Top most row of the box
Xpos% = Left most column of the box
Ylen% = Total number of rows to draw the box in, not
including the shadow
Xlen% = Total number of columns to draw the box, not
including the shadow
Bor% = The selected border outline
0 - No shadow
1 - Single line box
2 - Double line box
3 - Single sides/double top & bottom
4 - Double sides/single top & bottom
5 - Pulldown single box
6 - Pulldown double box
7 - Pulldown single top/double sides & bottom
8 - Pulldown double top/single sides & bottom
9 - Single top & bottom/no sides
10 - Double top & bottom/no sides
11 - Solid style 1
12 - Medium hatch
13 - Solid style 2
Shadow% = Placement of shadow
1 - Drop Left shadow using black spaces
2 - Drop Right using black spaces
3 - Drop Left changing background attributes
4 - Drop Right changing background attributes
BorCol% = Single integer for border color (see Attr)
TextCol% = Single integer for text color (see Attr)
See Also: Attr
---------------------------------------------------------------------
CapsOff SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Toggles Caps Lock key off.
Example: CALL CapsOff
See Also: CapsOn, CapStat
Command Usage Page 13
---------------------------------------------------------------------
CapsOn SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Toggles Caps Lock key on.
Example: CALL CapsOn
See Also: CapsOff, CapStat
---------------------------------------------------------------------
CapStat FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns true if Caps Lock is on.
Example: IF CapStat% THEN CALL CapsOff
See Also: CapsOff, CapsOn
---------------------------------------------------------------------
Center FUNCTION TOOL.PBU
---------------------------------------------------------------------
Centers a string with spaces padded to the left and right.
Example: Centered$=Center$("This is centered",TotCol%)
Where TotCol% = total number of columns to center string
within.
See Also: LPad, LRotate, RPad, RRotate, Trim
---------------------------------------------------------------------
ChangeWin SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Changes the size of the current windo. There can be NO shadow on the
windo when you resize it.
Example: CALL ChangeWin(Dir%)
Where Dir% = the direction that you want to resize.
1 - Add to the right one position
2 - Remove from the right one position
3 - Add to the bottom one row
4 - Remove from the bottom one row
---------------------------------------------------------------------
CheckKey FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Checks the keyboard buffer to see if a key is present without
removing it.
Example: IF CheckKey% THEN GOSUB GetAllKeys
See Also: ClrKBD, GetKey, IsAlt, IsCaps, IsCtrl, IsInsert, IsLShift,
IsNum, IsRShift, IsScroll, StuffKey
Command Usage Page 14
---------------------------------------------------------------------
ClearWin SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Clears the contents of the current windo.
Example: CALL ClearWin
See Also: OpenWin, WinColor, WPrint, WPrintC
---------------------------------------------------------------------
CloseHandle SUB-ROUTINE EMSIO.PBU
---------------------------------------------------------------------
Closes a previously allocated EMS handle and de-allocates all memory
used.
Example: CALL CloseHandle(Handle%)
See Also: EMSHandle, FindHand, GetHandName, Handles, SetHandName
---------------------------------------------------------------------
CloseWin SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Closes the current active window. Do Not close a window unless it is
the last window you popped onto the screen, otherwise you lose
access to all windows following it.
Example: CALL CloseWin
See Also: OpenWin
---------------------------------------------------------------------
ClrKBD SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Clears all keys from the keyboard buffer.
Example: CALL ClrKBD
See Also: CheckKey, GetKey, StuffKey
---------------------------------------------------------------------
Compress SUB-ROUTINE TOOL.PBU
---------------------------------------------------------------------
Compresses a text string with approximately a 2:3 ratio. The only
valid charactors within the text string are uppercase letters,
space, comma, period, semi-colon, and colon.
Example: NewText$=Compress$(OldText$)
See Also: Decrypt, Encrypt, UnCompress
---------------------------------------------------------------------
CurBot FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns the scanline for the bottom of the cursor. The cursor need
not be displayed when routine is called.
Example: CursorBottom%=CurBot%
See Also: CurTop
Command Usage Page 15
---------------------------------------------------------------------
CurDisplay FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns the active video display.
Example: VidType%=CurDisplay%
Where 0 - Mono
1 - CGA
2 - EGA
3 - MCGA
4 - VGA
See Also: VidAddr, VidMode
---------------------------------------------------------------------
CurTop FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns the scanline for the top of the cursor.
Example: CursorTop%=CurTop%
See Also: CurBot
---------------------------------------------------------------------
Date2Int FUNCTION TOOL.PBU
---------------------------------------------------------------------
Converts a date between 01-01-1900 and 01-01-2030 into a 2-
byte integer.
Example: TheDate%=Date2Int%(DATE$)
See Also: Int2Date
---------------------------------------------------------------------
Decrypt FUNCTION TOOL.PBU
---------------------------------------------------------------------
Decrypts a string using a password.
Example: PRINT Decrypt$(Text$,Password$)
See Also: Compress, Encrypt, UnCompress
---------------------------------------------------------------------
DelChar FUNCTION TOOL.PBU
---------------------------------------------------------------------
Deletes a charactor from within a string.
Example: NewText$=DelChar$(OldText$,5)
Would delete the 5th charactor from OldText$
See Also: InsChar
Command Usage Page 16
---------------------------------------------------------------------
Dir2 FUNCTION DOSIO.PBU
---------------------------------------------------------------------
Returns the filename, filesize, and filedate for a given filespec and
attribute.
Example: PRINT Dir2$(Spec$,Atr%,Size&,FileDate$)
Where Spec$ - File Specification (ie: "*.*")
Atr% - File attribute to search for
Size& - size of returned file
FileDate$ - date of returned file
Note: If you use "" as the filespec then the routine will
search for the next file using the same Spec$ and
Atr%
See Also: PRINDIR.BAS
---------------------------------------------------------------------
DrvSpace FUNCTION DOSIO.PBU
---------------------------------------------------------------------
Returns the number of bytes available for default drive as a
double precision integer.
Example: PRINT "Total Bytes Free on Current Drive:";DrvSpace#
See Also: CurDrive, SetDrive
---------------------------------------------------------------------
EMSFree FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Returns the amount of free EMS memory.
Example: FreeSpace%=EMSFree%
See Also: EMSInst, FreePages
---------------------------------------------------------------------
EMSHandle FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Allocates the requested pages and returns the handle number.
Example: Handle%=EMSHandle%(Pages%)
Where Pages% = The number of pages you wish to allocate.
See Also: CloseHandle, FreePages, SetHandName
---------------------------------------------------------------------
EMSInst FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Returns the amount of EMS memory installed.
Example: PRINT "You have ";EMSInst%;" bytes of EMS"
See Also: EMSFree, EMSStat, EMSVer, FreePages, IsEMS
Command Usage Page 17
---------------------------------------------------------------------
EMSStat FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Returns the status of the EMS driver.
Example: Status%=EMSStat%
See Also: EMSVer, IsEMS
---------------------------------------------------------------------
EMSVer FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Returns the version number of the EMS driver.
Example: Version%=EMSVer%
See Also: EMSStat, IsEMS
---------------------------------------------------------------------
Encrypt FUNCTION TOOL.PBU
---------------------------------------------------------------------
Encrypts a text string using a password.
Example: Secret$=Encrypt$(Text$,Password$)
See Also: Compress, Decrypt, UnCompress
---------------------------------------------------------------------
Evaluate SUB-ROUTINE TOOL.PBU
---------------------------------------------------------------------
Evaluates a given mathematical expression and returns an
answer.
Example: CALL Evaluate(Expression$, Result#, ErrCode%)
Where Expression$ = a mathematical expression, ie:
"(4+4)*6"
Result# = a double precision real number
ErrCode% = any errors that may occur
---------------------------------------------------------------------
Exist FUNCTION DOSIO.PBU
---------------------------------------------------------------------
Returns true if given filename exists.
Example: IF Exist%(Path$+FileName$) THEN GOSUB LoadFile
See Also: CurDir, CurDrive, GetRec, NumRecs, PutRec
---------------------------------------------------------------------
FileCount FUNCTION DOSIO.PBU
---------------------------------------------------------------------
Reports the number of files within a given path and
specification that
have a given attribute.
Example: NumFiles%=FileCount("*.*",Atr%)
Where Atr% = Attribute of files to search
See Also: CurDir, CurDrive, GetAttr, GetDir, GetDrive, SetAttr
Command Usage Page 18
---------------------------------------------------------------------
Fill SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Fills a box on the screen with a given charactor and
background attribute.
Example: CALL Fill(Ypos%, Xpos%, Ylen%, Xlen%, Char%, Atr%)
Where Char% = Charactors to fill box with
Atr% = Attribute to display charactor in
See Also: Attr, ReAttr, Recolor
---------------------------------------------------------------------
FindHand FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Finds handle number for given 8 charactor name.
Example: Handle%=FindHand%("TEST")
See Also: CloseHandle, EMSHandle, GetHandName, Handles, SetHandName
---------------------------------------------------------------------
Fore FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Calculates foreground from single color attribute integer.
Example: ForeGround%=Fore(Atr%)
See Also: Attr, Back
---------------------------------------------------------------------
FreePages FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Returns the number of free pages in EMS.
Example: PRINT "There are ";FreePages%;" left in EMS"
See Also: EMSFree, EMSInst, EMSStat, EMSVer, Handles, IsEMS,
PageFrame
---------------------------------------------------------------------
GetAddr SUB-ROUTINE TOOL.PBU
---------------------------------------------------------------------
Returns segment and offset of a string.
Example: CALL GetAddr(Text$, Segmnt%, Offst%)
Where Segmnt% = The 64k segment in which the string resides
Offst% = The offset from the segment where the string
resides
---------------------------------------------------------------------
GetDir SUB-ROUTINE DOSIO.PBU
---------------------------------------------------------------------
Returns an array containing all filenames matching
specification
Example: CALL GetDir("*.*",Atr%,AllFiles$())
Where AllFiles$() = a predimensioned array to hold the
filenames
See Also: CurDir, CurDrive, Exist, FileCount
Command Usage Page 19
---------------------------------------------------------------------
GetDosV FUNCTION DOSIO.PBU
---------------------------------------------------------------------
Returns the version of DOS currently being used.
Example: PRINT "DOS Version:";GetDosV%*.01; is currently being used"
---------------------------------------------------------------------
GetHandName FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Returns the 8 charactor name for a given handle number.
Example: PRINT "The name for EMS Handle number 8 is
";GetHandName$(8)
See Also: CloseHandle, EMSHandle, FindHand, Handles, SetHandName
---------------------------------------------------------------------
GetKey FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Gets a single key from the keyboard buffer, waits if no key
is pressed.
Does not check status of the shift keys.
Example: PRINT"Press Any Key to Continue":I$=GetKey$
See Also: CheckKey, ClrKBD, MouseKey, MaskIn, NumIn, Text Ed, TextIn
---------------------------------------------------------------------
GetRec FUNCTION DOSIO.PBU
---------------------------------------------------------------------
Retrieves a record from a random access file.
Example: Record$=GetRec$(Filename$, RecNum%, Recsize%)
Where RecNum% = The number of the record that you want
RecSize% = The size of each record
See Also: Exist, NumRecs, PutRec
---------------------------------------------------------------------
GetScrn FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Places any portion of the screen and it's color attributes in
a string.
Example: Top$=GetScrn$(Ypos%, Xpos%, Xlen%)
See Also: PutScrn
---------------------------------------------------------------------
Handles FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Returns the number of active EMS handles.
Example: PRINT "There are ";Handles%;" currently active"
See Also: CloseHandle, EMSHandle, EMSVer, FindHand, GetHandName,
IsEMS
---------------------------------------------------------------------
Hex2Dec FUNCTION TOOL.PBU
---------------------------------------------------------------------
Converts a hexadecimal number to a decimal integer.
Example: Integer%=Hex2Dec%("C800")
See Also: Bin2Dec
---------------------------------------------------------------------
InitWindos SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Initializes all variables for windo routines.
Example: CALL InitWindos
See Also: OpenWin, CloseWin
---------------------------------------------------------------------
InsChar FUNCTION TOOL.PBU
---------------------------------------------------------------------
Inserts a charactor or string into another string at desired
position.
Example: NewString$=InsChar$(OldString$,"Test")
See Also: Center, DelChar, Trim
---------------------------------------------------------------------
InsertOff SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Toggles insert key off.
Example: CALL InsertOff
See Also: InsertOn, InsStat, IsInsert
---------------------------------------------------------------------
InsertOn SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Toggles insert key on.
Example: CALL InsertOn
See Also: InsertOff, InsStat, IsInsert
---------------------------------------------------------------------
InsStat FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns the status of the insert key.
Example: Status%=InsStat%
See Also: InsertOff, InsertOn, IsInsert
---------------------------------------------------------------------
Int2Date FUNCTION TOOL.PBU
---------------------------------------------------------------------
Converts a 2 byte integer into a valid date.
Example: PRINT "Stored Date is ";Int2Date$(Stored%)
See Also: Date2Int
---------------------------------------------------------------------
IsAlpha FUNCTION TOOL.PBU
---------------------------------------------------------------------
Returns true if a charactor is between "a" and "z" or "A" and
"Z".
Example: IF IsAlpha%(I$) THEN Yep
See Also: GetKey$, IsAlphaNum, IsASCII, IsNumKey, IsPunc
---------------------------------------------------------------------
IsAlphaNum FUNCTION TOOL.PBU
---------------------------------------------------------------------
Returns true is a charactor is alpha or numeric.
Example: IF IsAlphaNum%(I$) THEN Yep
See Also: GetKey$, IsAlpha, IsASCII, IsNumKey, IsPunc
---------------------------------------------------------------------
IsAlt FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns true if an Alt key is depressed.
Example: IF IsAlt% THEN AltKeyPressed
See Also: GetKey$, IsCaps, IsCtrl, IsInsert, IsLShift, IsNumKey,
IsRShift
---------------------------------------------------------------------
IsASCII FUNCTION TOOL.PBU
---------------------------------------------------------------------
Returns true if the value of a charactor is between 32 and
127.
Example: IF IsASCII%(I$) THEN AddChar
---------------------------------------------------------------------
IsCaps FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns true if the caps lock key is depressed.
Example: IF IsCaps% THEN Yep
See Also: GetKey$, IsAlt, IsCtrl, IsInsert, IsLShift, IsNumKey,
IsRShift
---------------------------------------------------------------------
IsCtrl FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns true is a Ctrl key is depressed.
Example: IF IsCtrl% THEN Yep
See Also: GetKey$, IsAlt, IsCaps, IsInsert, IsLShift, IsNumKey,
IsRShift
---------------------------------------------------------------------
IsEMS FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Returns true if EMS is installed.
Example: IF IsEMS% THEN Yep
See Also: EMSFree, EMSInst, EMSStat, EMSVer, FreePages, PageFrame
---------------------------------------------------------------------
IsInsert FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns true if Insert key is depressed.
Example: IF IsInsert% THEN Yep
See Also: GetKey$, IsAlt, IsCaps, IsCtrl, IsLShift, IsNumKey,
IsRShift
---------------------------------------------------------------------
IsLShift FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns true if Left Shift Key is depressed.
Example: IF IsLShift% THEN Yep
---------------------------------------------------------------------
IsMouse FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns the number of buttons if a mouse is installed.
Example: IF IsMouse% THEN Buttons%=IsMouse%
See Also: MLocate, MouseKey, MouseOff, MouseOn, MouseStat, MouseWin
---------------------------------------------------------------------
IsNumKey FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns true if the Num Lock key is depressed.
Example: IF IsNum% THEN Yep
See Also: GetKey$, IsAlt, IsCaps, IsCtrl, IsInsert, IsLShift,
IsRShift
---------------------------------------------------------------------
IsNum FUNCTION TOOL.PBU
---------------------------------------------------------------------
Returns true if charactor is numeric.
Example: IF IsNum%(I$) THEN GetMoreNumbers
See Also: IsAlpha, IsAlphaNum, IsASCII, IsPunc
---------------------------------------------------------------------
IsPunc FUNCTION TOOL.PBU
---------------------------------------------------------------------
Returns true if a charactor is punctuation, ie "';:.,/?[{]}!@#$%&*()-
Example: IF IsPunc(I$) THEN Yep
See Also: IsAlpha, IsAlphaNum, IsASCII, IsNum
---------------------------------------------------------------------
IsRShift FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns true if the Right Shift key is depressed.
Example: IF IsRShift% THEN Yep
See Also: GetKey$, IsAlt, IsCaps, IsCtrl, IsInsert, IsLShift,
IsNumKey
---------------------------------------------------------------------
IsScroll FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns true if Scroll Lock key is depressed.
Example: IF IsScroll% THEN Yep
See Also: GetKey$, IsAlt, IsCaps, IsCtrl, IsInsert, IsLShift,
IsNumKey
---------------------------------------------------------------------
LPad FUNCTION TOOL.PBU
---------------------------------------------------------------------
Pads a string to the left desired number of charactors using
desired string.
Example: NewString$=LPad$(OldString$,80,32)
Would pad OldString$ to 80 charactors using a space
See Also: RPad$, Trim$
---------------------------------------------------------------------
LRotate FUNCTION TOOL.PBU
---------------------------------------------------------------------
Rotates a string one charactor to the left, making the first
char the last.
Example: NewString$=LRotate$(OldString$)
See Also: RRotate
---------------------------------------------------------------------
LScroll SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Scrolls any portion of the screen to the left.
Example: CALL LScroll(TopRow%,LeftCol%,BotRow%,RightCol%,Cols%)
See Also: RScroll, ScrollDN, ScrollUP, ScrollWin
---------------------------------------------------------------------
MakeInt FUNCTION TOOL.PBU
---------------------------------------------------------------------
Makes a single integer from 2 bytes.
Example: Integer%=MakeInt%(Msb%, Lsb%)
Where Msb% = The most significant byte
Lsb% = The least siginificant byte
---------------------------------------------------------------------
MapPage SUB-ROUTINE EMSIO.PBU
---------------------------------------------------------------------
Maps a logical page to the pageframe.
Example: CALL MapPage(Handle%, Page%)
Where Handle% = The handle number you wish to access
Page% = The logical page you want mapped for use
See Also: FindHand, GetHandName, Handles, PageFrame, SetHandName,
UnMapPage
---------------------------------------------------------------------
MaskIn SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Gets Masked Input from user.
Example: CALL MaskIn(Ypos%, Xpos%, TexCol%, Hilite%, Mask$, Deflt$,
Term$) Where TexCol% = The color of the text when editing
is done
Hilite% = The color of the text as it is edited
Mask$ = the desired mask to use for getting input
_ = Any charactor
@ = Alpha charactors only (Upper and Lower)
# = Numeric charactors only
! = Uppercase Alpha only
| = Alpha and numeric only (Uppercase)
Deflt$ = The default answer for input
Term$ = The terminating key for editing
See Also: GetKey, MouseKey, NumIn, TextEd, TextIn
---------------------------------------------------------------------
Menu FUNCTION WINDO.PBU
---------------------------------------------------------------------
Displays a menu and gets choice from user.
Example: Choice%=Menu%(Choices$(), Ypos%, Ylen%, Current%, Hilite%)
Where Choices$() = Choices to display
Ypos% = The starting row to the display menu relative
to
the current open windo
Ylen% = The number of the choices to display. If all
choices cannot be displayed then remaining
choices will be scrolled onto the screen.
Current% = The default choice to hilite first
Hilite% = The color to display the current choice
See Also: OpenWin
---------------------------------------------------------------------
MLocate SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Locates the mouse cursor to a desired position on the screen.
Example: CALL MLocate(Ypos%,Xpos%)
See Also: IsMouse, MouseOff, MouseOn, MouseStat
---------------------------------------------------------------------
MouseKey FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Gets keyboard input from user. If mouse is attached, mouse
movements are also used. Left Button = Enter, Right Button = Esc
Example: I$=MouseKey$
See Also: GetKey$, IsMouse
---------------------------------------------------------------------
MouseOff SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Turns off mouse cursor.
Example: CALL MouseOff
See Also: IsMouse, MouseOn, MouseStat
---------------------------------------------------------------------
MouseOn SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Turns on mouse cursor.
Example: CALL MouseOn
See Also: IsMouse, MouseOff, MouseStat
---------------------------------------------------------------------
MouseStat SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Returns the status of the mouse.
Example: CALL MouseStat(Button%, Ypos%, Xpos%)
Where Button% = Current button(s) depressed
See Also: IsMouse, MouseOff, MouseOn
---------------------------------------------------------------------
MouseWin SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Defines the window for the mouse cursor to be displayed in.
Example: CALL MouseWin(Ypos%, Xpos%, Ylen%, Xlen%)
See Also: IsMouse, MouseOff, MouseOn, MouseStat
---------------------------------------------------------------------
MoveWin SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Moves the current active windo on the screen.
Example: CALL MoveWin(Dir%)
Where 1 - Right
2 - Left
3 - Down
4 - Up
See Also: OpenWin, NoShadow
---------------------------------------------------------------------
NoShadow SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Removes the shadow from the current windo. (Required when
moving or resizing windos)
Example: CALL NoShadow
See Also: AddShadow, ChangeWin, MoveWin
---------------------------------------------------------------------
NumIn SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Gets numeric input from user.
Example: CALL
NumIn(Ypos%,Xpos%,Digits%,NumCol%,Hilite%,Answer#,Term$)
Where Digits% = Numbers after decimal point
NumCol% = Color of text after input
Answer# = Double precision real number with input
Term$ = Key used to terminate input
See Also: GetKey, MaskIn, TextEd, TextIn
---------------------------------------------------------------------
NumOff SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Toggles Num Lock off.
Example: CALL NumOff
See Also: NumOn
---------------------------------------------------------------------
NumOn SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Toggles Num Lock on.
Example: CALL NumOn
See Also: NumOff
---------------------------------------------------------------------
NumRecs FUNCTION DOSIO.PBU
---------------------------------------------------------------------
Returns the number of records within a random access file.
Example: Records%=NumRecs%(Filename$,RecordLength%)
See Also: Exist, GetRec, PutRec
---------------------------------------------------------------------
NumStat FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns true if Num Lock is on.
Example: IF NumStat% THEN Yep
See Also: NumOff, NumOn
---------------------------------------------------------------------
OpenWin SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Pops a window on the screen saving all contents underneath.
Example: CALL
OpenWin(Ypos%,Xpos%,YLen%,Xlen%,Brdr%,BrC%,TxC%,Shd%,Zm%,Ns
%) Where Brdr% = Border selection (see Box)
Where BrC% = The color attribute to print border
Where TcC% = The color attribute for text
Shd% = The placement of the shadow (see Box)
Zm% = True - zoom the windo onto the screen
Ns% = True - make noise when opening window
See Also: Box, CloseWin
---------------------------------------------------------------------
PageFrame FUNCTION EMSIO.PBU
---------------------------------------------------------------------
Returns the 64k segment of the page frame.
Example: PRINT "The PageFrame is located at";HEX$(PageFrame)
See Also: IsEMS, EMSStat, EMSVer
---------------------------------------------------------------------
PutRec SUB-ROUTINE DOSIO.PBU
---------------------------------------------------------------------
Puts a record into a file.
Example: CALL PutRec(Filename$,Record$,Record%,RecLength%)
See Also: Exist, GetRec, NumRecs
---------------------------------------------------------------------
PutScrn SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Puts a string created with GetScrn back onto the screen.
Example: CALL PutScrn(Ypos%, Xpos%, Text$)
See Also: GetScrn
---------------------------------------------------------------------
ReAttr SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Changes the color attribute of any position on the screen.
Example: CALL ReAttr(Ypos%, Xpos%, Ylen%, Ypos%, NewColor%)
See Also: Attr, Fill, Recolor
---------------------------------------------------------------------
Recolor SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Changes the color attribute of all positions on the screen.
Example: CALL Recolor(Old%, New%)
Where Old% is the attribute on the screen you want
to change.
New% is the attribute on the screen to replace the Old%
with.
See Also: Attr, Fill, ReAttr
---------------------------------------------------------------------
Reverse FUNCTION TOOL.PBU
---------------------------------------------------------------------
Reverse the order of any string.
Example: NewString$=Reverse$(OldString$)
See Also: DelChar, InsChar, LRotate, RRotate
---------------------------------------------------------------------
RPad FUNCTION TOOL.PBU
---------------------------------------------------------------------
Pads a string to the right to desired number of places with
desired char.
Example: NewString$=RPad$(OldString$,80,32)
See Also: LPad, Trim
---------------------------------------------------------------------
RRotate FUNCTION TOOL.PBU
---------------------------------------------------------------------
Rotates all the charactors in a string to the right one
position.
Example: NewString$=RRotate$(OldString$)
See Also: LRotate
---------------------------------------------------------------------
RScroll SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Scrolls any portion of the screen to the right.
Example: CALL RScroll(TopRow%,LeftCol%,BotRow%,RightCol%,Cols%)
See Also: LScroll, ScrollDN, ScrollUp, ScrollWin
---------------------------------------------------------------------
ScrollDN SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Scrolls any part of the screen down one line.
Example: CALL ScrollDN(Left%, Right%, Top%, Bottom%, Atr%)
See Also: ScrollUP, ScrollWin
---------------------------------------------------------------------
ScrollOff SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Toggles Scroll Lock off.
Example: CALL ScrollOff
See Also: ScrollOn, ScrollStat
---------------------------------------------------------------------
ScrollOn SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Toggles Scroll Lock on.
Example: CALL ScrollOn
See Also: ScrollOff, ScrollStat
---------------------------------------------------------------------
ScrollStat SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Returns true is Scroll Lock is on.
Example: IF ScrollStat% THEN Yep
See Also: ScrollOff, ScrollOn
---------------------------------------------------------------------
ScrollUp SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Scrolls any portion of the screen up one line.
Example: CALL ScrollUP(Left%, Right%, Top%, Bottom%, Atr%)
See Also: ScrollDN, ScrollWin
---------------------------------------------------------------------
ScrollWin SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Scrolls the current windo up, down, left or right.
Example: CALL ScrollWin(Dir%)
Where 1 - Down
2 - Up
3 - Left
4 - Right
See Also: OpenWin, ScrollDN, ScrollUp
---------------------------------------------------------------------
SetHandName SUB-ROUTINE EMSIO.PBU
---------------------------------------------------------------------
Assigns an 8 charactor name to an EMS Handle
Example: CALL SetHandName(Handle%, HandName$, ErrCode%)
See Also: CloseHandle, EMSHandle, FindHand, GetHandName, Handles,
IsEMS
---------------------------------------------------------------------
SetText SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Sets cursor color from attribute.
CALL SetText(Atr%)
See Also: Attr, Back, Fore
---------------------------------------------------------------------
ShiftAlpha FUNCTION TOOL.PBU
---------------------------------------------------------------------
Shifts alpha charactors ina string over one charator.
Example: Shifted$=ShiftAlpha$("ABcd",2)
Where Shifted$ would Equal "CDef"
---------------------------------------------------------------------
StuffKey SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Stuffs the keyboard buffer with up to 16 charactors. May not
work with
many keyboard enhancers.
Example: CALL StuffKey(Text$)
See Also: ClrKBD, GetKey, MouseKey
---------------------------------------------------------------------
TextEd SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Lets user edit the chars within a string.
Example: CALL TextEd(Ypos%, Xpos%, Cpos%, TxC%, Hl%, Txt$, Term$)
Where Cpos% = Cursor position within the string
TxC% = The normal text color
Hl% = The hilighted text color
Txt$ = The text to edit
Term$ = The terminating key
See Also: GetKey, MaskIn, NumIn, TextIn
---------------------------------------------------------------------
TextIn SUB-ROUTINE SCRNIO.PBU
---------------------------------------------------------------------
Gets text input from the user.
Example: CALL TextIn(Ypos%, Xpos%, Max%, TxC%, Hl%, Txt$, Term$)
Where Max% = The maximum charactors to allow in Txt$
See Also: GetKey, MaskIn, NumIn, TextEd
---------------------------------------------------------------------
Title SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Displays a title on current windo in a desired color.
Example: CALL Title(Title$, Position%)
Where Position% = Placement of title on windo
1 - Top Left
2 - Top Center
3 - Top Right
4 - Bottom Left
5 - Bottom Center
6 - Bottom Right
See Also: OpenWin, WPrint, WPrintC
---------------------------------------------------------------------
Trim FUNCTION TOOL.PBU
---------------------------------------------------------------------
Trims the spaces from both ends of a string.
Example: NewString$=Trim$(OldString$)
See Also: LPad, RPad
---------------------------------------------------------------------
UnCompress FUNCTION TOOL.PBU
---------------------------------------------------------------------
UnCompresses a previously compressed string.
Example: Text$=UnCompress$(Secret$)
See Also: Compress, Decrypt, Encrypt, ShiftAlpha
---------------------------------------------------------------------
UnMapPage SUB-ROUTINE EMSIO.PBU
---------------------------------------------------------------------
UnMaps pageframe to back to logical page location.
Example: CALL UnMapPage (Handle%, ErrCode%)
See Also: EMSHandle, FreePages, Handles, IsEMS, MapPage, PageFrame
---------------------------------------------------------------------
VidAddr FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns the segment for video I/O on active display.
Example: PRINT"The video segment is located at";HEX$(VidAddr%)
See Also: CurDisplay, VidMode
---------------------------------------------------------------------
VidMode FUNCTION SCRNIO.PBU
---------------------------------------------------------------------
Returns the video mode for current display.
Example: PRINT"Current Video Mode is";VidMode%
See Also: CurDisplay, VidAddr
---------------------------------------------------------------------
WinColor SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Changes the text color of the current windo.
Example: CALL WinColor(Atr%)
See Also: Attr, Back, Fore, OpenWin, WPrint, WPrintC
---------------------------------------------------------------------
WPrint SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Prints a string within the current windo in desired color.
Example: CALL WPrint(Ypos%, Xpos%, Text$, Atr%)
Where Ypos% and Xpos% are relative to the top right corner
of the window.
See Also: OpenWin, WPrintC
---------------------------------------------------------------------
WPrintC SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Prints a string centered wihin the current windo in desired
color.
Example: CALL WPrintC(Ypos%, Text$, Atr%)
See Also: OpenWin, WPrint
---------------------------------------------------------------------
ZoomBox SUB-ROUTINE WINDO.PBU
---------------------------------------------------------------------
Zooms a box onto the screen with option for noise.
Example: CALL ZoomBox(Ypos%, Xpos%, Ylen%, Xlen%, BrDr%, Sh%,
BrClr%, TxC%)
See Also: Box, OpenWin