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

Explain combinational logic circuits, Explain Combinational logic circuits ...

Explain Combinational logic circuits Ans. Combinational logic circuits:- (i) Outputs only depend upon present state of the input. (ii) No memory element present or no f

Execution of a full instruction - computer architecture, Execution of a ful...

Execution of a full Instruction: Regard as the instruction: Add (R3), R1 Executing this particular instruction needed the below described actions: a) Fetch the

Mathematical simulation and modelling applications, Mathematical Simulation...

Mathematical Simulation and Modelling Applications The tasks include mathematical simulation and modelling need lots of parallel processing. Three fundamental formalisms in mat

Computer assignment problem, contributes to violence in our society. Others...

contributes to violence in our society. Others point out that television contributes to the high level of obesity among children. Now, we may have to add financial problems to the

Explain about associative memory organisations, Q. Explain about Associativ...

Q. Explain about Associative Memory Organisations? The associative memory is arranged in w words with b bits per word. In w x b array, every bit is known as a cell. Every cell

Callable modules of program code within one abap/4 program, How can we crea...

How can we create callable modules of program code within one ABAP/4 program? We can create callable modules by two techniques:- By defining Macros. By creating incl

Explain the instruction decode, Q. Explain the Instruction Decode? Ins...

Q. Explain the Instruction Decode? Instruction Decode: This phase is performed under control of Control Unit of computer. The Control Unit determines the operation which is t

What are the reasons for feedback in a control system, Question: a) Wha...

Question: a) What are the reasons for feedback in a control system? b) What are the roles of the configuration and fault managers in a real-time system? c) What are stimu

What are conditional chain statement, What are conditional chain statement?...

What are conditional chain statement? ON CHAIN-INPUT similar to ON INPUT. The ABAP/4 module is called if any one of the fields in the chain having a value other than its in

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