Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> portw word access to i/o portws pp 206</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PORTW                     Word Access to I/O PortWs                   pp 206

 Syntax:  PortW [HexWordIndex]

 Type:    Word

 Form:    Function or Procedure

 Purpose: Read from or Write to I/O Ports 0..$FFFF.

 Notes:   The PortW array is pre-defined as PortW : Array [0..$FFFF] of Word ;
          Since Turbo Pascal does not have an unsigned Integer, the only way
          to access Port numbers greater than $7FFF is to use hex notation.
          Otherwise, the Port index would be a negative number.


 ----------------------------------------------------------------------------



 Usage:
       VAR
          WordVar     : Word            ;  { Declare a word variable   }

       BEGIN
          WordVar     := PortW [$60]    ;  { Read from port 60h        }
          PortW [$61] := $20            ;  { Write a value to port 61h }
       END.

See Also: Array Port

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson