Segmentation: Difference between revisions

Jump to navigation Jump to search
m
adding links
[unchecked revision][unchecked revision]
No edit summary
m (adding links)
Line 19:
*CS = Code Segment
*DS = Data Segment
*SS = [[Stack]] Segment
*ES = Extra Segment
*FS/GS = General Purpose Segments
Line 45:
Here the new value for CS is encoded in the jump instruction. Eg JMP 0x10:0x100 says to load CS with segment 0x10 and IP with 0x100. CS:IP is the logical address of the instruction to be executed.
====Far Call====
This is exactly the same as a far jump, but the current values of CS/IP are pushed onto the [[stack]] before executing at the new position.
====INT====
The processor reads the new value of CS/IP from the Interrupt Vector Table and then executes what is effectively a far call after pushing EFLAGS onto the [[stack]].
====Far Return====
Here the processor pops the return segment/offset from the [[stack]] into CS/IP and switches execution to that address.
====IRET====
This is exactly the same as a far return apart from the processor popping EFLAGS off the [[stack]] in addition to CS/IP.
 
Apart from these cases no instruction alters the value of CS.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu