PortInByte Procedure

Reads a byte of data from the specified input port.

Syntax

[ ucData = ] PortInByte ( nPort )

The PortInByte procedure syntax has the following parts:

 

Name

Type

Description

ucData

Byte

Returned byte read from the port

nPort

Val Short

Input port number (address)

Comments

The function, which may be used to read data from I/O-mapped, PC-based instruments, returns a byte containing the data read from nPort. nPort can be any number in the range 0x0000 - 0xFFFF.

Note: Physical memory and Port I/O access is a privileged instruction and require special access code from MTS. Contact MTS for obtaining the  access code - ATEasy 2023 (v12.0).

Example

The following example reads a byte from address 0x311 to ucInByte:

ucData = PortInByte(0x311)

See Also

PortInBytes, PortInWord, PortOutByte, PortOutBytes