What is code segment, Computer Engineering

Assignment Help:

Q. What is CODE SEGMENT?

The logical program segment is termed as code segment. When linker links a program it makes a note in header section of program's executable file defining the location of code segment when DOS invokes the loader to load an executable file in memory then loader reads that note.  As it loads the program in memory loader also makes notes to itself of exactly where in memory it essentially places every one of the program's other logical segments.  As loader hands execution over to program it has just loaded it sets CS register to address the base of segment identified by linker as code segment. This reduces each instruction in code segment addressable in segment relative terms in form CS: xxxx. 

Linker also presumes by default that first instruction in code segment is aimed to be first instruction to be executed.  That instruction shall appear in memory at an offset of 0000H from base of code segment so linker passes that value on to loader by leaving an another note in header of program's executable file. Loader sets IP (Instruction Pointer) register to that value.  This sets CS:IP to segment relative address of first instruction in program.


Related Discussions:- What is code segment

What is the main use of structures, What is The main use of structures ...

What is The main use of structures The main use of structures is to lump together collections of disparate variable types, so they can conveniently be treated as a unit. For ex

SGML, Write short note of SGML

Write short note of SGML

What is asynchronous dram, What is asynchronous DRAM? In asynchronous D...

What is asynchronous DRAM? In asynchronous DRAM, the timing of the memory device is controlled asynchronously. A specialized memory controller circuit gives the essential contr

The job allocation register, Signify this problem by means of: i.    An Ent...

Signify this problem by means of: i.    An Entity Relationship model; ii.    Relational tables. Pete's Programmers is a firm which supplies part time staff on contract to organisat

Add multiple layout cells, Q. Add Multiple Layout Cells ? Next you will...

Q. Add Multiple Layout Cells ? Next you will add three layout cells below the logo cell you just created. Afterwards you will insert page's navigation buttons in these cells.

SWOT ANALYSIS, OPPORTUNITIES AND THREATS IN COMPUTER FEILD

OPPORTUNITIES AND THREATS IN COMPUTER FEILD

Lexical analyser, The aim of this project is for you to construct a fully w...

The aim of this project is for you to construct a fully working compiler for a small simple programming language, SPL. The compiler will read in SPL source code and produce ANSI C

Mips - computer architecture, MIPS - computer architecture: The MIPS ...

MIPS - computer architecture: The MIPS ISA, so far 3 instruction formats Fixed 32-bit instruction 3-operand, load-store architecture 32 general-purpose register

Cohesion, Identify the type of cohesion in the following statements: 1. ...

Identify the type of cohesion in the following statements: 1. Compute average daily temperatures at various sites 2. Initialize sums and open files 3. Create new temperature rec

Differentiate traditional commerce and electronics commerce, Differentiate ...

Differentiate Traditional Commerce verses Electronics Commerce. Identity: Into traditional commerce customers can simply authenticate the identity of a merchant simply throug

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd