您现在的位置是: 软件 > 设计在线 > 网页陶吧 > 技术平台 > HTML学习 > 正文


-Win xp中的多种网络
-试验试验试验试验
-用Freehand实现位图矢量化
-网络电话面面观

Delphi三十六之硬件篇
2001-01-15· ·陈立平··yesky

1 2  下一页

  1 .端口读写

function ReadPortB( wPort : Word ) : Byte;

 begin
  asm
  mov dx, wPort
  in al, dx
  mov result, al
 end;

end;

procedure WritePortB( wPort : Word; bValue : Byte );

 begin
  asm
 
   mov dx, wPort
   mov al, bValue
   out dx, al
 end;

end;

  2.获知当前机器CPU的速率(MHz)

function CPUSpeed: Double;

 const
  DelayTime = 500;

 var
  TimerHi, TimerLo: DWORD;
  PriorityClass, Priority: Integer;

 begin
 PriorityClass := GetPriorityClass(GetCurrentProcess);
 Priority := GetThreadPriority(GetCurrentThread);
 SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
 SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_TIME_CRITICAL);
 Sleep(10);

1 2  下一页

■ 相关内容
 VxD技术及其在实时反病毒中的应用
 Delphi三十六之数据库篇
 delphi三十六之网络篇
 delphi三十六之编辑篇
 Delphi之三十六计之界面篇
 Delphi之三十六计之系统篇
 delphi三十六之磁盘篇
 delphi三十六之加密篇
感谢 访问天极网,如果您觉得该文章涉及版权问题,请看这里!