i use visual studio 2012 , created x64 bit program returns value of sidt function (without offset). problem when run program, returns right value, when run program multiple times, returns right value
main.cpp:
#include <iostream> #include <conio.h> #include <stdlib.h> using namespace std; extern "c" unsigned long long int sidt_function(); int main() { printf("%llx\n", sidt_function()); _getch(); return 0; }
sidt_function.asm:
.code sidt_function proc push rbp mov rbp, rsp sub rsp, 130h sidt tbyte ptr [rbp-10] mov rax, [rbp-8] leave ret sidt_function endp end
each core (physical or virtual) in multi-core cpu has own idt. you're seeing idtr values different cores in system. none of them incorrect.
Comments
Post a Comment