PortOutBytes Procedure

Writes bytes of data to the specified output port.

Syntax

[ lOutBytes = ] PortOutBytes ( nPort, pSrc [, lBytes ] )

The PortOutBytes procedure syntax has the following parts:

 

Name

Type

Description

lOutBytes

Long

Returned number of bytes written

nPort

Val Short

Output port number (address)

pSrc

Val Any

Send data buffer

lBytes

Val Long

Number of bytes to write. The default value is -1 - all bytes in pSrc will be written.

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 sends 32,000 bytes to the address 0x311 from the pSrc data buffer:

lOutBytes = PortOutBytes (0x311, pSrc, 32000)

See Also

PortInByte, PortInBytes, PortOutByte, PortOutWords