Setting up LDT question
Posted: Fri Dec 05, 2003 12:00 am
lemme write out a few lines of code
mov ax,0x0400
mov ds,ax
(er..I hope this is how u write ur assembly code ..atleast w.r.t segment registers irrespective of whether it's 32 or 16 bit code..Excuse me if i am ignorant..i am a total newbie.Well..doesnt make too much sense to me..32 bit offsets but value moved into Segment register is only 16 bits?)
Now i have to set up my LDT.Say i've got my object file..
Now when the program executes this thing is gonna be moved into the DS
which wud yield erroneus results
So i am supposed to change this move in the object file with that of the selector or rather set up the DS reg beforehand and nop these instructions(which i suppose wud be bad coz for instance there cud be another move into
a ds register)...
If it's the first case...i wud need to find the value bein moved on to DS reg i suppose create a selector for the value moved into the register..
Any provisions to do that with an object file?
Thanks in advance
mov ax,0x0400
mov ds,ax
(er..I hope this is how u write ur assembly code ..atleast w.r.t segment registers irrespective of whether it's 32 or 16 bit code..Excuse me if i am ignorant..i am a total newbie.Well..doesnt make too much sense to me..32 bit offsets but value moved into Segment register is only 16 bits?)
Now i have to set up my LDT.Say i've got my object file..
Now when the program executes this thing is gonna be moved into the DS
which wud yield erroneus results
So i am supposed to change this move in the object file with that of the selector or rather set up the DS reg beforehand and nop these instructions(which i suppose wud be bad coz for instance there cud be another move into
a ds register)...
If it's the first case...i wud need to find the value bein moved on to DS reg i suppose create a selector for the value moved into the register..
Any provisions to do that with an object file?
Thanks in advance