Port numbers used with IN and OUT instructions are addresses of hardware regions on a chip. They are places where internal data wires end in contact pads on the edge of the chip, to which the wires of external devices connect. An instruction such as IN 5 copies the signals on the wires connected to contact pad set number 5 into the accumulator. Some input device is physically connected to contact pad set number 5 and is setting those pads and the wires attached to them to logic values. Symmetrically, OUT 5 copies the contents of the accumulator register onto the wires that end in contact pad set 5. Any device attached to that pad set would get these logic values. |