qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Port and PortW Arrays
  System Unit Contents Index                                Back
 
  Port[portnum]
  PortW[portnum]
 
  Unit:      System (used automatically)
 
  See also:  Mem, MemW, MemL
 
  Description
 
    Two predefined arrays are available for accessing ports directly.
    Port accesses bytes and PortW accesses words. The port number
    is specified as the array index. The entire Port or PortW arrays
    cannot be used. Single elements of the arrays can be used in
    assignments and references, but not as variable parameters.
    Using ports is an advanced and potentially dangerous technique
    that should be used with care.
 
    Some examples are shown below:
 
       { Read byte from port $64 }
       PortRead := Port[$64];
 
       { Write word to port $B6  }
       PortW[$B6] := $1120;