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

Illustrate the list of key differences to word processors, Illustrate the l...

Illustrate the list of key differences to word processors The following is a list of key differences to word processors: -  Most word processors force users to work on a doc

Describe five bit even parity checker, Describe five bit even parity checke...

Describe five bit even parity checker. Ans: Five bit even parity checker: EX-OR gates are utilized for checking the parity as they generate output 1, while the input ha

Creating a function, I''m suppose to create a function called calc_rectang_...

I''m suppose to create a function called calc_rectang_area(height, width),that takes two parameters: the height and width of the rectangular and return the area of the rectangular.

What is the size limitation of an access database, Size limitation does not...

Size limitation does not relate to number of records in a table within a database. Forms, reports, macros, and modules also add to database size, but is rather minimal compared to

Find a connection factory, Why do I get an exception when trying to find a ...

Why do I get an exception when trying to find a connection factory? Ans) The exception is regularly something like java.io.InvalidClassException or java.lang.NoClassDefFoundErro

What is the benefit of report wizard over an auto report, What is the benef...

What is the benefit of Report Wizard over an Auto Report? It takes a little more work to make a report with the report wizard than with the Auto Report but you have a lot more

Register transfer - computer architecture, Register transfer - computer arc...

Register transfer - computer architecture: Register transfer: The output and input gates for register Ri are controlled by the signals Riout and Riin respectively.

Define entry section and exit section, Define entry section and exit sectio...

Define entry section and exit section. The critical section problem is to design a protocol that the processes can use to cooperate. Every process must request permission to e

Engineering applications, Engineering Applications A few of the enginee...

Engineering Applications A few of the engineering applications are: Airflow circulation over aircraft machinery, Simulations of simulated ecosystems. Airflow c

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