From: "Peter Below (TeamB)" <100113.1101@compuXXserve.com> Subject: Re: Writing to parallel port Date: 25 Apr 1999 00:00:00 GMT Message-ID: Content-Transfer-Encoding: 8bit References: <7fsuas$bn212@forums.borland.com> Content-Type: text/plain; charset=iso-8859-1 Organization: TeamB Mime-Version: 1.0 Reply-To: 100113.1101@compuXXserve.com Newsgroups: borland.public.delphi.basm > As i wrote in my last message, I still need to use the EPP parallel port. > Some one told me to use In, Out instructions of BASM but I'm not used to > write asm code. > Note: these function use Delphi 2/3 register calling convention and thus will get the first parameter in eax, the second in edx! function PortIn(IOport:word):byte; assembler; asm mov dx,ax in al,dx end; function PortInW(IOport:word):word; assembler; asm mov dx,ax in ax,dx end; procedure PortOut(IOport:word; Value:byte); assembler; asm xchg ax,dx out dx,al end; procedure PortOutW(IOport:word; Value:word); assembler; asm xchg ax,dx out dx,ax end; This will not work on NT, it works on Win9x only because the OS has a generic port driver. For NT you need to install such a driver first. Here are a few URLs worth checking: TVicHW32 http://www.entechtaiwan.com/tools.htm Tinyport (NT only) http://www.winsite.com/info/pc/winnt/programr/tinypo20.zip DriverX http://www.tetradyne.com Peter Below (TeamB) 100113.1101@compuserve.com) No e-mail responses, please, unless explicitly requested!