我正在尝试调用 cpuid 并将 EBX、ECX 和 EDX 的输出打印到控制台,但它打印的是空行
这是我的代码:
.586
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
.data
.data?
mybuffer byte 100 dup(?)
.code
start:
mov eax, 0
cpuid
invoke lstrcpy, addr mybuffer, ebx
invoke lstrcat, addr mybuffer, ecx
invoke lstrcat, addr mybuffer, edx
invoke GetStdHandle, STD_OUTPUT_HANDLE
invoke WriteConsole, eax, addr mybuffer, sizeof mybuffer, NULL, NULL
invoke ExitProcess, 0
end start