🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.program
1 messages
1 total messages Started by ɽ�� Sun, 21 Jun 1998 00:00
������CPU��Ƶ
#692
Author: ɽ��
Date: Sun, 21 Jun 1998 00:00
37 lines
1990 bytes
    ��������CPU��Ƶ����׼,����Pentium�Ƴ���,
����Pentium��RDTSCָ�ȷ�����.����ʱ���㹻
��,�ɴﵽ100%.
    RDTSCָ���Ƕ�ʱ�Ӽ���.Pentium��64λ��ʱ����
�ڼ�����,�ӿ������м���.RDTSC��64λʱ�����ڼ�
��������EDX:EAX��.��ʱ�Ӿ�����100%.������ִ��ij
ָ����ٴ�������,һ�Dz����ж�,���Ǹ���CPU�õ���
�ڿ��ܲ�һ��,��ʹ��ͬһCPU,Ҳ�ܸ��ٻ����Ӱ��,��
������ǰ��������ײ�׼��ԭ��.
    ���˾�ȷ��ʱ�����ڼ���,�Ǿͺð���.ֻҪ�и�
ʱ��,���ܸ㶨.�ҿ��Ա��ж�,���Դ���һ���̺߳�̨
ִ��,ֻҪʱ��׼����.
    ����һPentium75�ϲ���,��������74MHZ,����
����ȥ��,���һ,�Ǿ���75MHZ��.
   C���Ե�����Ϊ:
   /*
   Click()����ʱ��.
   RDTSC()��ʱ�����ڼ�����
   */
   i=Click();
   while(i<=Click());
   RDTSC(&H1,&L1);
   while(i<=Click()+1+XX);/*XX��������Click��.*/
   /*������ù��ж�*/
   RDTSC(&H2,&L1);
   Calculate();
   ...

������Ļ�಻֧��RDTSCָ��,�������º�:
RDTSC   macro
    db 0fh
    db 31h
ENDM

--
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads