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

Personal computing environment, Reply and discuss the role of the SAS 70 re...

Reply and discuss the role of the SAS 70 report in reviewing internal controls. Provide publicly available examples of SAS 70 reports and explain. Problem Discuss the

Advantages and disadvantages of mealy - moore state machine, What are the a...

What are the advantages and disadvantages of Mealy and Moore state machine? Advantage and Disadvantage of Mealy and Moore state machine: In Mealy as the output variable is a

The max number of calling modes stacked at one time is, The max number of ...

The max number of calling modes stacked at one time is? NINE

Difference between narrative form and documentary form, Question: (a) E...

Question: (a) Explain clearly the difference between a Proposal and a Treatment for a video production project. (b) Explain clearly the difference between Narrative form an

Determine the purpose of GDTR, Elucidate the purpose of GDTR. If the microp...

Elucidate the purpose of GDTR. If the microprocessor sends linear address 00200000H to paging mechanism, which paging directory entry and which page table entry is accessed? GD

Show the conflict in register, Q. Show the conflict in register? All mi...

Q. Show the conflict in register? All micro-operations written on a line are to be executed at same time provided the statements or a group of statements to be implemented toge

What are the roll and page areas, What are the roll and page areas? Ro...

What are the roll and page areas? Roll and page areas are SAP R/3 buffers used to kept user contexts (process requests).  The SAP dispatcher assigns procedure requests to work

What is base register addressing, Q. What is Base Register Addressing ? ...

Q. What is Base Register Addressing ? An addressing technique in which content of an instruction specifies base register is added to address field or displacement field of the

File history.d1 contains a brief history of computing, File History.d1 cont...

File History.d1 contains a brief history of computing. There are no indentations in this file. Write a program to read this file, inserting five blank spaces at the beginning of ea

What is content addressable memory, What is content addressable memory? ...

What is content addressable memory? The memory unit accessed by the content is known as an associative memory or content addressable memory. This type of memory is accessed con

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