unit PortsIOLog; interface procedure LogStrLn(const aStr:string); register; IMPLEMENTATION var LogFile:text; const cLogFileName='C:\PortIO.log'; procedure LogStrLn(const aStr:string); begin writeln(LogFile, aStr); end; INITIALIZATION Assign(LogFile,cLogFileName); Rewrite(LogFile); FINALIZATION Close(LogFile); END.