Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- extern "C" char* __stdcall _sysInfo();
- ////////////////////////////////////////////////////////
- int main() //
- {
- int i;
- printf("%s\n", _sysInfo() );
- scanf("%d", &i);
- }
- /////////////////////////////////////////////////////////////////////////////////////
- include 'win32a.inc'
- format MS COFF
- public _sysInfo as '__sysInfo@0'
- section '.text' code readable executable
- ;/////////////////////////////////////////////////////////////
- proc _sysInfo ;//
- mov edi, sz_2
- cld
- mov eax,80000002h ; Прочитать информацию о процессоре
- @@:
- push eax
- cpuid
- stosd
- xchg eax,ebx
- stosd
- xchg eax,ecx
- stosd
- xchg eax,edx
- stosd
- pop eax
- inc eax
- cmp eax,80000004h
- jbe @b
- mov eax, sz_2
- ret
- endp
- ;
- section '.data' data readable writeable
- ;------------------------------------------------------------- Создание переменных:
- sz_2 db 59 dup(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement