if anyone could help me i would greatly appreciate it...
lemme see if i get this....in pmode..a20 enabled..memory is referenced by placing a segment selector in a segment register..
ex.
mov ax, segselector
mov cs, ax
jmp 0x00 <--will jump to base of codeseg whether base starts at 0:0 or 50:0...this will also load CS with a segment selector
thanks anyone....
need help...segment selectors in pmode.....
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:need help...segment selectors in pmode.....
you cannot mov cs,<something>. There is no such instruction in the IA-32. cs and eip can both be set up with a far jump (jmp segment:offset).
Re:need help...segment selectors in pmode.....
right. If you want to put a selector in CS, you must do a far jump using this syntax (with NASM) :
Where SELECTOR is a valid entry in your GDT and ADDRESS is (here) a 32-bit memory location
Code: Select all
jmp dword SELECTOR:ADDRESS