PortOutByte Procedure

Writes a byte of data to the specified output port.

Syntax

[ lOutBytes = ] PortOutByte ( nPort, ucData )

The PortOutByte procedure syntax has the following parts:

 

Name

Type

Description

lOutBytes

Long

Returned 1 on success and 0 on failure

nPort

Val Short

Output port number (address)

ucData

Val Byte

Byte to be sent.

Comments

nPort can be any number in the range 0x0000 - 0xFFFF. This function may be used to write data to I/O-mapped, PC-based instruments.

Warning: Some I/O ports are reserved for internal computer usage. Writing to these ports may result in computer lockout or other undesired consequences.

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 writes 0xAA to address 0x311:

PortOutByte (0x311, 0xAA)

See Also

PortInByte, PortInBytes, PortOutBytes, PortOutWord