PortOutWord Procedure

Writes a word (16 bits) of data to the specified I/O port.

Syntax

[ lOutWords = ] PortOutWord ( nPort, nData )

The PortOutWord procedure syntax has the following parts:

 

Name

Type

Description

lOutWords

Long

Returned 1 on success and 0 on failure

nPort

Val Short

Output port number (address)

nData

Val Short

Word 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 addresses (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 0x55AA to address 0x310:

PortOutWord (0x310, 0x55AA)

See Also

PortInWord, PortInWords, PortOutByte, PortOutWords