using SS & DS in gcc
using SS & DS in gcc
If gcc expects to always have ds and ss addresses to be the same then is there no efficient way i can maintain a separate Stack segment? I mean other than copying data at every function call is there any other way around this?
Only Human
Re:using SS & DS in gcc
sure you can create a separate selector for SS, as long as it maps to the same address as DS, then you can have a non exec stack etc.
-- Stu --
Re:using SS & DS in gcc
Go to the Intel developer's site and request copies of the Intel Architecuture processor manuals. The P4 version explains differences where applicable between processors from the 386 to the P4 and Xeon. Get volumes 1 - 3. They are free and they also post them to you free of charge.Neo wrote: could you explain that for a newbie ;D
Read the first volume to get a general overview of the processor, and then read volume 3 for the gory details you will need when writing a kernel.
http://developer.intel.com/design/Pentium4/manuals/
You can download them in PDF as well.
Re:using SS & DS in gcc
i just wanted to know does GCC expect the same values for DS and CS also?
Only Human
Re:using SS & DS in gcc
it doesnt matter WHAT ds/ss/cs is. as long as
DS:0x000000 = SS:0x00000.
if DS starts at 1mb mark, SS must start at 1mb mark.
gcc does not care that DS = 0x08 and SS = 0x58 as long as the memory the selectors point to map to the same memory addresses.
DS:0x000000 = SS:0x00000.
if DS starts at 1mb mark, SS must start at 1mb mark.
gcc does not care that DS = 0x08 and SS = 0x58 as long as the memory the selectors point to map to the same memory addresses.
-- Stu --