Manual PCI-DIO-48JP/JPS
12
OutPort
Function: Writes all 16 bits of value to the hardware port at address. This
function returns the value output.
Declaration:
function OutPort(byval address as integer,
byval value as integer) as integer
Peek
Function: Reads a byte from main memory (DRAM).
Declaration:
function Peek(byval segment as integer,
byval offset as integer) as integer
Poke
Function: Writes the lower eight bits of
value
to
segment
:
offset.
Declaration: function Poke(byval segment as integer,
byval offset as integer, byval value as
integer) as integer
Note that in all of the above functions, an inherent limitation of BASIC in general and VisualBASIC in
particular makes the values sent less intuitive. All integers in BASIC are signed numbers, wherein data are
stored in two's complement form. All bit patterns must be converted to-and-from this two's complement form
if meaningful display is required. Otherwise, values returned from the InPortb function will be -128 to 127,
rather than 0 to 255. An alternative is to perform all assignments in hexadecimal, rather then decimal form.
Before the program will execute, the .GBL file must be modified to include the path to the VBACCES.DLL
as appropriate for your system. Merely replace the statement "VBACCES.DLL" with
"drive:path\VBACCES.DLL".
As an alternative to changing the source code, you can copy the VBACCES.DLL file into your Windows
directory. This will allow multiple programs to find the same .DLL without having to know where it is located.
Just leave off all references to a path in the .GBL file as shown in the sample.