SourcePoint Intel Help

Table of Contents

port

Display or change the contents of an 8-bit I/O port.

Syntax

[result =] [[px]] port(io-addr) [= expr]

Where:

result

specifies an debug variable of type ord 1 to which the function return value is assigned. If result is not specified, the return value is displayed on the next line of the screen.

[px]

is the viewpoint override, including punctuation ( [ ] ), specifying that the viewpoint is temporarily set to processor x of the boundary scan chain.  The processor can be specified as px (where x is the processor ID), or an alias you have defined for a given processor ID.  ALL cannot be used as a viewpoint override.

io-addr

specifies a 16-bit address in the processor I/O space. The available io-addr range is 0 to 0ffffh. The use of parentheses is optional.

expr

specifies a 8-bit number or expression. Using this option writes the data to the specified I/O port.

Discussion

Use the port command to read from and write to the specified I/O port with the specified 8-bit data. You can access up to 64K 8-bit ports.

Example 1

To display and change the contents of the I/O port at address 88h:

Command input:

port 88h

Result:

0088H FFH "."

Command input:

port 88h = 0abh
port 88h

Result:

ABH "."

Example 2

To assign one port value to another port:

Command input:

port 90h = port 88h

Example 3

To create a debug variable named portvar and assign a port value to it:

Command input:

define ord1 portvar
portvar = port 90h
portvar

Result:

FFH

Related Topics