• PRG41 - �p�������� ������� rdtsc ��� ����p���� ���p����� �p�����

    From FAQServer@2:5020/181 to All on Thu Jun 26 07:37:10 2025
    [Q]: �p�������� ������� rdtsc ��� ����p���� ���p����� �p�����

    [A]: Julius Goryavsky (2:5030/16.32)

    ��� ���稪 y����稢����� �� 1 �� ������ ⠪� CPU, �
    ���� ��� 100MHz pentium-� - 100000000 p�� � ᥪy��y ! ���
    wrap �p�������� �p�� ~6000 ���... ��� ��� ���稪 - 64
    ����.

    �� ASM �ᯮ�짮���� ��� �祭� �p���:

    rdtsc macro
    db 0Fh, 31h
    endm
    .486p
    .model flat
    .code
    public GetPentiumTSC
    GetPentiumTSC proc near
    mov ecx , [esp + 4]
    rdtsc
    mov [ecx] , eax
    mov [ecx + 4] , edx
    xor eax , eax
    ret
    GetPentiumTSC endp
    end

    �맮� �� C: QWORD - ������� ᫮�� - ������ 8 ���⮢,
    (���� Intel ��⠥� �� ������� ᫮�� - �� 4 ����... :-))

    APIRET APIENTRY GetPentiumTSC (QWORD * tsc);
    .....
    QWORD time;
    .....
    rc = GetPentiumTSC (&time);

    � ��� � OBJ: �� �祭� �����쪨�, ⠪ �� ����p��p ��
    ������ p����������...

    section 1 of uuencode 5.21 of file gettsc.obj by R.E.M.

    begin 644 gettsc.obj M@`P`"F=E='1S8RYA<VUQEAT```1&3$%4!5]$051!!5]415A4!$1!5$$$0T]$ M1;Z8!P"I#@`$!@&?F`<`J0```P4!KYH"``)BD!0``0$-1V5T4&5N=&EU;513 F0P```&&(!```H@'1H!(``0``BTPD!`\QB0&)400SP,/PB@(``'0`
    `
    end
    sum -r/size 38769/205 section (from "begin" to "end")
    sum -r/size 59743/128 entire input file

    --- INN 2.7.3
    * Origin: This echo is READ-ONLY. Send %HELP to FAQSERVER at (2:5020/181)