unit MainFuncs; interface uses Windows,CreateThreads,sysutils; procedure Run; stdcall; function InByte(Port:word):byte; stdcall; procedure OutByte(b:byte; Port:word); stdcall; function LastError:longint; stdcall; function InByteR(Port:word):byte; register; procedure OutByteR(b:byte; Port:word); register; function LastErrorR:longint; register; implementation uses Hardware; //----------------------------------------------------------------------------- procedure Run; stdcall; begin StartRun:=true; if RunOnDemand then begin; sleep(1000); WaitForTerminate(infinite); end; end; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- function InByteR(Port:word):byte; register; begin if RunOnDemand then begin Result:=MI1201AGM.InB(Port); end; end; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- procedure OutByteR(b:byte; Port:word); register; begin if RunOnDemand then begin MI1201AGM.OutB(b,Port); end; end; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- function InByte(Port:word):byte; stdcall; begin Result:=InByteR(Port); end; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- procedure OutByte(b:byte; Port:word); stdcall; begin OutByteR(b,Port); end; //----------------------------------------------------------------------------- function LastError:longint; stdcall; begin Result:=0; end; function LastErrorR:longint; register; begin Result:=0; end; begin end.