About
The code segment is a segment that stores the code data type of a program. Ie it stores the instructions being executed.
Articles Related
Next Instruction
The next instruction to be executed in the code segment is located by the following logical address:
CS:EIP
where:
- the CS segment selector value is in the CS register
- the EIP offset is located in the EIP register (Instruction Pointer Register)
More Instruction - Cycle.
Management
Segment Selector
The segment selector that locate this segment is the CS segment register.
Register
The CS register contains the segment selector for the code segment.
The CS register cannot be loaded explicitly by an application program. Instead, it is loaded implicitly by instructions or internal processor operations that change program control (such as procedure calls, interrupt handling, or task switching).