Port Address

Hello,
I am new to programming, learning Visual Basic just now. I am working with a software program written in VB and upgraded to Visual Studio.NET. It's using some kind of hexadecimal code for parallel port addresses; does anybody know, how ports are coded in this way and what do the numbers mean




Answer this question

Port Address

  • SteveTri

    Thanks for your help,
    I already found the page you are talking about.... the problem is that the program uses a function named outbyte (public function outbyte) (or inbyte) which receives the hex port address and another number, sometimes 4 or more. Any idea what outbyte is
    Thanks

  • onurkocoglu

    The hex numbers you are referring to are the address of the ports control registers. Each port is controlled by three eight bit registers. See below for an example that corresponds to LPT1 (Parallel Printer Port) on most computers. 

    LPT1 PortAddresss = 3e8h (1000d)

    PortAddress + 0 : Data register
    PortAddress + 1 : Status register
    PortAddress + 2 : Control register

    Additional Info can be found here.
    http://www.beyondlogic.org/spp/parallel.htm

  • Arvid

    I would assume it outputs 8 bits (1 byte) of data to the port. What type of application is this What kind of device are you trying to talk to over the port
  • Port Address