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 do you mean by inline function, The idea behind inline functions is to...

The idea behind inline functions is to insert the code of a known function at the point where the function is called. If done carefully, this can improve the application's performa

What is model, What is model?  A universe together with an assignment o...

What is model?  A universe together with an assignment of relations to relation symbol is known as a model.  A model M is a tuple (U, P1, P2..Pk), where U is the universe and P

Short notes on displacement only addressing mode, (a) Write short notes on...

(a) Write short notes on displacement only addressing mode. (b) Explain the formats of a 80-bit floating point number. (c) Given the following assembly program. Instructi

What is a parsing, what is parsin? Source programmed statements are ob...

what is parsin? Source programmed statements are observed as tokens, recognizing, building block of language the task of scanning the source statement and classifying the diff

What is critical section problem, What is critical section problem?  Co...

What is critical section problem?  Consider a system having of 'n' processes. Each process has segment of code known as a critical section, in which the process may be changing

C++, program to find area under the curve y=f(x) between x=a and y=b , inte...

program to find area under the curve y=f(x) between x=a and y=b , integrate y=f(x)between limits of a and b

What is the network service access policy, What is the Network Service Acce...

What is the Network Service Access Policy A high-level, issue-specific policy which defines those services that are allowed or denied from the restricted network. It also co

Determine the number of lines for writing into memory, Words having 8-bits ...

Words having 8-bits are to be stored into computer memory.  The number of lines required for writing into memory are ? Ans. 8-bit words needed 8 bit data lines.

Solve out linear equations, Assume that you have been asked to solve proble...

Assume that you have been asked to solve problem with exact area constraints, the area error being no more than 1% for each department. What are the linear equations you would nee

What do you mean by data warehousing, What do you mean by data warehousing?...

What do you mean by data warehousing? Data warehouse implies as: a) It is subject oriented b) It is integrated and c) It is time variant d) It is non-volatile colle

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