Could someone show me how to change this GDT to have the granularity bit set so I can have a 0xFFFFFFFF stack?
Thankyou ( I do have the a20 enabled in RM...is the PM a20 code ok for RM?)
GDTR
dw GDTEnd-1
dd GDT
GDT
nullsel equ $-GDT
GDT0
dd 0
dd 0
CodeSel equ $-GDT
dw 0ffffh
dw 0
db 0
db 09ah
db 0cfh
db 0h
DataSel equ $-GDT
dw 0ffffh
dw 0h
db 0h
db 092h
db 0cfh
db 0
GDTEnd
GDT bit
Re:GDT bit
I think you'll find its in the 4th byte the one that you have 9ah in. You then just use calculator in windows and convert it to binary set the granularity bit convert back to hex and then put that in palce of 9ah.
Peter
Peter
Re:GDT bit
Okay its bit 55, 23 of the second DWORD so it will be in the 5th declaration so the one with 0cfh. You then convert this to binary which is:-
11001111
check bit 23 is set whihc is the last bit of this byte. It looks like granunaltiy is already enabled as the lasy bit in this byte is 1. If you want to turn it off you would put the value 4Fh in place of 0CF which is 01001111 in binary.
hope this helps
Peter
11001111
check bit 23 is set whihc is the last bit of this byte. It looks like granunaltiy is already enabled as the lasy bit in this byte is 1. If you want to turn it off you would put the value 4Fh in place of 0CF which is 01001111 in binary.
hope this helps
Peter