Writes words of data to the specified I/O port.
[ lOutBytes = ] PortOutBytes ( nPort, pSrc [, lWords ] )
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 |
lWords |
Val Long |
Number of words to write. The default value is -1 - all words in pSrc will be written. |
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).
The following example sends 124 words to the address 0x311 from the pSrc data buffer:
lOutWords = PortOutWords (0x311, pSrc, 124)