cpuclk.asm

来自「Use Asm in Visual Basic With Class Vtabl」· 汇编 代码 · 共 10 行

ASM
10
字号
; Write the CPU clock cycle count (since cpu reset) into the passed ByRef Currency (64 bit) parameter

[bits 32]
    rdtsc                                   ;# Read the cpu clock cycle count into eax/edx
    mov ecx, dword [esp+8]                  ;# Address of Currency parameter into ecx
    mov [ecx], eax                          ;# Put eax to the low part of the currency variable
    mov [ecx+4], edx                        ;# Put edx to the high part of the currency variable
    xor eax, eax                            ;# Clear eax, tell VB a-okay
    ret 8                                   ;# Return

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?