is there any way to flush GDT in vc++?
i use jmp 0x8:offset but its not work & also this
Code: Select all
push selector
push offset
retf
Code: Select all
push selector
push offset
retf
Code: Select all
IRET
Code: Select all
align 4
dd(MULTIBOOT_HEADER_MAGIC)
dd(MULTIBOOT_HEADER_FLAGS)
dd(CHECKSUM)
dd(HEADER_ADRESS)
dd(LOADBASE)
dd(00)
dd(00)
dd(HEADER_ADRESS+0x30)
dd(0x0)
dd(0x0)
dd(0x0)
dd(0x0)
call Initialize_Fake_GDT
mov ax,Date_Selector
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
jmp cs:higherhalf
higherhalf:
mov esp,Stack
push 0
popf
push ebx
push eax
call Entry_Point
Code: Select all
push ss
push esp
pushfd
push 0x8
lea eax,[higherhalf]
push eax
iretd
higherhalf:
mov esp,Stack
push 0
popf
push ebx
push eax
Then you probably need to learn to read it.but i get error from visual stdio