Board index » delphi » Read/write to parallel/serial port

Read/write to parallel/serial port

I would like to read and write to the parallel or serial port.
I have been programming i tp and bp for some time, but havent found
any function the enables this. Is there a function, or should a start
to learn Tasm to be able to do this.

And is there FAQ about this problem

***************************
* Jacob Heder  :-)        *
* Aalborg Universty       *
* Denmark                 *
* http://www.auc.dk/~31jh *
* Email 3...@but.auc.dk   *
***************************

 

Re:Read/write to parallel/serial port


In article  <Pine.PCF.3.91.960329115306.9216A-10 0000@[1 30.225.56.252]>

Quote
Space Cowboy <3...@but.auc.dk> wrote:
> I would like to read and write to the parallel or serial port.
> I have been programming i tp and bp for some time, but havent found
> any function the enables this. Is there a function, or should a start
> to learn Tasm to be able to do this.

Oh dear, why do all people think they need assembler for things like
that?
You can send every byte you like to the ports. These are the registers
of the Universal Asynchron Receiver Transmitter (UART), the IC which
*is* the serial port:

Adress           Read            Write

Base Adress      Receive         Transmit and Baudrate LSB
B.A. + 1         -               Interr. Activate and Baudrate MSB
B.A. + 2         Int. identif.   -
B.A. + 3         -               Transm. control
B.A. + 4         Modem control   Modem control
B.A. + 5         Transm. status  -
B.A. + 6         Modem status    -

(8250 UART)

If you are interested in more detailed information, please e-mail me.
It's also possible to use software interrupts to initialize the ports.

The base adresses are:

COM1:    $3f8
COM2:    $2f8
COM3:    $3e8
COM4:    $2e8

The parallel port uses an 8255, which has the following registers:

Adress           Read            Write

Base Adress      Data(sometimes) Data
B.A. + 1         Status          -
B.A. + 2         Control         Control

For more detailed information... you know what to do...

   Basti

--
------------------------------------------------------------------
  Bastisoft    101674.2...@compuserve.com

  Fleestedt, Germany
------------------------------------------------------------------

Other Threads