if there is some error then what value should i move to esp.
Code: Select all
mov eax,DATASEL??????
mov ds,eax??????
mov es,eax
mov fs,eax
mov gs,eax
mov ss,eax
mov esp,0xffff ;set esp to the largest possible value
DATASEL EQU $-GDT ; 4GB Flat Data at 0x0 with max 0xFFFFF limit
DW 0xFFFF ; Limit(2):0xFFFF
DW 0x0 ; Base(3)
DB 0x0 ; Base(2)
DB 0x92 ;present,ring0,data/stack,read/write(10010010)
DB 0xCF ; Limit(1):0xF | Flags:4Kb inc,32bit (11001111)
DB 0x0 ; Base(1)