Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-07

Re: Ports unit on x64 Linux port

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vladimir Karpenko
Show quoted text 22 lines
>> x64 port? > >>There is a tutorial for Hardware Access here: >>http://wiki.lazarus.freepascal.org/Hardware_Access > Well of course i read that, but there is no ports unit in x64 Linux. > > uses > Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls, > {$IFDEF WIN32} > Windows; > {$ENDIF} > {$IFDEF Unix} > ports; > {$ENDIF} I solved the hardware access on Windows and GNU/Linux x32 too. I use the following units: BaseUnix, x86, crt. I use fpIOPerm to give permission to the port, and WritePortB to write to the port.

Well WritePortB is in x86 unit? which is abscent in X86_64 port:( I wonder if some one can write in x64 asm program like this: MOV DX,0378H

MOV AL,data //data - char.

OUT DX,AL

Felipe Monteiro de Carvalho
to Vladimir Karpenko
Vladimir Karpenko wrote 7 lines
Well WritePortB is in x86 unit? which is abscent in X86_64 port:( I wonder if some one can write in x64 asm program like this: MOV DX,0378H MOV AL,data //data - char. OUT DX,AL

I think yes, it should work in linux if you use ioperm.

Felipe Monteiro de Carvalho