Contents
--------

1. What is VBIO.DLL v2.3
2. Installation
3. How to use the program
4. Status of the program
5. Distribution Status
6. About author


1. What is VBIO.DLL v2.3
------------------------

VBIO.DLL is a 32-bit DLL that enables VisualBasic (version 4, 5 or 6) to
perform port I/O and memory R/W operations under Win95 or Win98. Some
vital functions and statements, namely Inp, Inpw, Out, Outw, Peek, Peekw,
Poke, Pokew, GetLptBaseAddr, GetComBaseAddr, Enable, Disable and Delay are
available in this DLL.


2. Installation
---------------

Upon expanding the zip file you will get the following:

   1. VBIO.DLL     - the DLL for Visual Basic
   2. README.TXT   - this file

Then copy VBIO.DLL to your system directory (e.g. \windows\system\).


3. How to use the program
-------------------------

The following functions/statements are available in the DLL:

  Name            Type       Purpose
  ----            ----       -------
  Anjan           Statement  Unlocks the DLL
  Inp             Function   Returns a byte read from a machine input port
  Inpw            Function   Returns a word read from a machine input port
  Out             Statement  Sends a byte to a machine output port
  Outw            Statement  Sends a word to a machine output port
  Peek            Function   Returns a byte read from linear memory,
                             returns -1 if failed
  Peekw           Function   Returns a word read from linear memory,
                             returns -1 if failed
  Poke            Function   Writes a byte to linear memory,
                             returns -1 if failed
  Pokew           Function   Writes a word to linear memory,
                             returns -1 if failed
  GetLptBaseAddr  Function   Returns the base address of the specified LPT port
  GetComBaseAddr  Function   Returns the base address of the specified COM port
  Enable          Statement  Enables hardware interrupt functions
  Disable         Statement  Disables hardware interrupt functions
  Delay           Statement  Delays by 0.85 micro-sec times the argument
  AboutVBIO       Statement  Displays version information 

In VisualBasic 4, 5 or 6 (General) (Declaration) you need to set the
following string:

Private Declare Sub Anjan Lib "vbio.dll" ()
Private Declare Function Inp Lib "vbio.dll" (ByVal portaddr&) As Integer
Private Declare Function Inpw Lib "vbio.dll" (ByVal portaddr&) As Long
Private Declare Sub Out Lib "vbio.dll" (ByVal port&, ByVal byt%)
Private Declare Sub Outw Lib "vbio.dll" (ByVal port&, ByVal wrd&)
Private Declare Function Peek Lib "vbio.dll" (ByVal memaddr&) As Integer
Private Declare Function Peekw Lib "vbio.dll" (ByVal memaddr&) As Long
Private Declare Function Poke Lib "vbio.dll" (ByVal memaddr&, ByVal byt%) As Integer
Private Declare Function Pokew Lib "vbio.dll" (ByVal memaddr&, ByVal wrd&) As Integer
Private Declare Function GetLptBaseAddr Lib "vbio.dll" (ByVal lpt&) As Integer
Private Declare Function GetComBaseAddr Lib "vbio.dll" (ByVal com&) As Integer
Private Declare Sub Enable Lib "vbio.dll" ()
Private Declare Sub Disable Lib "vbio.dll" ()
Private Declare Sub Delay Lib "vbio.dll" (ByVal count&)
Private Declare Sub AboutVBIO Lib "vbio.dll" ()

Range of parameter lpt: 1-3 (for LPT1 to LPT3)
Range of parameter com: 1-4 (for COM1 to COM4)
Range of parameter count: 1-32768

Please note that, due to the complex memory management scheme adopted
for Win95 or Win98, some part of the linear memory is protected from
read or write operations whereas some part is 'read only' and some part
is in 'read/write' state. The mapping of the linear memory is different
from that of the physical memory, therefore a memory mapped I/O device
may not be available at the same address of the linear memory.

Use of 'Enable' and 'Disable' statements: These are provided to perform time
critical jobs within a procedure. All hardware interrupts may be disabled
with the 'Disable' statement, including the system clock, mouse movement,
VB timers and OS multitasking operations. And it is the duty of the programmer
to enable these interrupt related operations with the 'Enable' before comming
out from the procedure - otherwise the computer may hang.

Examples:

   'unlock the dll
   Anjan

   'read data from port 379H
   a% = Inp(&H379)

   'send 20H to port 378H
   Out &H378, &H20

   'read data from memory FFFF0H
   a% = Peek(&HFFFF0)
   'if a% is -1, operation failed
  
   'write 40H to memory &H100000
   a% = Poke(&H100000, &H40)
   'if a% is -1, operation failed

   'get base address of LPT1
   baseaddr% = GetLptBaseAddr(1)

   'enable hardware interrupts
   Enable

   'delay by 500 micro-Second (count = 500/0.85 = 588)
   Delay 588

After loading, the DLL should be first unlocked by invoking 'Anjan'.
It may be placed in the (Form) (Load).

These routines are not compatible with WinNT.


4. Status of the program
------------------------

This program is freeware and is freely distributable.
The author will not be responsible for any kind of loss occuring
due to the use of this package.


5. Distribution status
----------------------

This program should not be distributed for commercial purposes.


6. About author
---------------

Anjan Rakshit
Calcutta, India

URL:
   http://personal.vsnl.com/ar

email:
   ar@giascl01.vsnl.net.in
   anjan_rakshit@hotmail.com
