Board index » delphi » BASIC - INP, OUT in Borland Pascal

BASIC - INP, OUT in Borland Pascal

I need to translate some BASIC language code and especially the
functions INP and OUT to Pascal. These two functions read or write
to I/O devices. In my case I am using the the parallel port.

Are there any similar functions/procedures in Borland Pascal
(I am using version 7.0) that do this? Or could you use some other
custom code to do the same job as INP and OUT?

Anyone been into these problems?

Thanks,
Bj?rn

 

Re:BASIC - INP, OUT in Borland Pascal


Quote
Bj?rn S?rheim wrote:

> I need to translate some BASIC language code and especially the
> functions INP and OUT to Pascal. These two functions read or write
> to I/O devices. In my case I am using the the parallel port.

> Are there any similar functions/procedures in Borland Pascal
> (I am using version 7.0) that do this? Or could you use some other
> custom code to do the same job as INP and OUT?

Use the port and portw arrays.
ex.
 port[$20] := $20
 while port[$b2] and $80 = 0 do {wait};

Brian Evans

Re:BASIC - INP, OUT in Borland Pascal


Hi

Use the port[address] and portW[address] function. You need to know the
address of the port used.
Christoph
mailto:c...@gmx.net

Bj?rn S?rheim schrieb in Nachricht <6jesbn$fn...@o.online.no>...

Quote

>I need to translate some BASIC language code and especially the
>functions INP and OUT to Pascal. These two functions read or write
>to I/O devices. In my case I am using the the parallel port.

>Are there any similar functions/procedures in Borland Pascal
>(I am using version 7.0) that do this? Or could you use some other
>custom code to do the same job as INP and OUT?

>Anyone been into these problems?

>Thanks,
>Bj?rn

Other Threads