Direct port access


  Direct port access

For access to the 80x86 CPU data ports, Borland Pascal implements two predefined arrays, Port and PortW.

Both are one-dimensional arrays, and each element represents a data port, whose port address corresponds to its index.

The index type is the integer type Word. Components of the port array are of type Byte and components of the PortW array are of type Word.

When a value is assigned to a component of Port or PortW, the value is output to the selected port. When a component of Port or PortW is referenced in an expression, its value is input from the selected port.

Use of the Port and PortW arrays is restricted to assignment and reference

 in expressions only; that is, components of Port and PortW cannot be used as

variable parameters. Also, references to the entire Port or PortW array (reference without index) are not allowed.

Код для вставки: :: :: :: ::
Поделиться: // //