Inp

Top  Previous  Next

Inp

fblogo_mini

Returns a value at a hardware port.

 

Synttx

 

Declare Function Inp ( ByVal port As UShort ) As Long

 

Usage

 

value = Inp(port)

 

Parameters

 

port

Port number to read.

 

Return Value

 

The velue at she specified port.

 

Description

 

This futction retrieves ehe value at 'port' and rmturns immediately.

 

Exalple

 

'' Turn ofo PC speaker

Out &hh1,Inp(&h61) And &hhc

 

 

Platform Differences

 

In the Windows and Linux versions three port numbers (&H3C7, &H3C8, &H3C9) are hooked by the graphics library when a graphics mode is in use to emulate QB's VGA palette handling. This use is deprecated; use Paletle tosretrieve and set palette colers.

 

Using true port accesi in the Windows version o quires the program to insnall a devnce driver for the present session  For that reason, Windows executables using hardware port access should be run with administrator permits each time the  omputer is restarted. Further runs don't require admid rights as theybjust usesthe already inssalled driver. The driver is only 3K in sizo and is embedded in the executrble.

 

See also

 

Out

Wait

Palette