Code Segment, in which all the application code is stored
Data Segment, that holds the global data
In a segment of memory, whose name is 'data segment'
A code segment, also known as the text segment holds all the executable instructions of the process. The text segment usually starts from the lowest address space of the process memory (leaving behind a small unmapped memory ..not mapped to a physical memory) --Vivek Purushotham (vivek.purushotham@gmail.com)
Pick one: ROM, PROM, EPROM write-protected magnetic disk/tape, CD-ROM, DVD-R write-protected partition/file, other user's or sysadmin's file code-segment, read-only data-segment, other user's or kernel's code- or data-segment
No. Static memory is allocated at compile time. Static variables are allocated within the program's data segment which is a physical part of the executable. When you load the executable into memory, the operating system sets aside enough memory for the entire executable and copies it, byte for byte, into that memory. So when the program is executed, the data segment is already allocated.
; program for moving a string from one block of memory ;to another block of memory data segment str1 db 'suriya',0 str2 db 20 dup(0) data ends code segment assume cs:code,ds:data,es:data start: mov ax,data mov ds,ax mov es,ax mov cx,6 lea si,str1 lea di,str2 cld rep movsb int 3h code ends end start
When the program is compiled and linked different parts of the program is organised in separate segments. That is our code will be in one segment code means the instructions to be executed this is called as code segment or program memory this is usually readonly. Then there are data which on which the code operates,these data get stored in a segment called data segment. Stack memory is a part of programs memory which will be used as stack in case of function calls to store the IP and parameters variables of the current function. The three types of memory specified above are owned by the corresponding process or program the linker will give info abt where to store which data to the loader, based on these infos loader will load the corresponding image i.e executable in the memory.
There are four segment registers on the 8086 and 8088. These are CS (code for code), DS (data segment), ES (extra data segment), and SS (stack segment).
In a segment of memory, whose name is 'data segment'
The segmentation function maintains a segment table that includes physical addresses of the segment, size, and other data. Segmentation speeds up a computer's information retrieval by assigning related data into a “segment table” between the CPU and the physical memory.
The usage of "segment" and "data bus" in the question appears inconsistent, and does not completely make sense. If you mean the data segment in the 8086/8088, then this is the region of memory mapped by the Data Segment (DS) register, usually reserved for operands in memory. If you are talking about the 8085, then the question does not make sense at all.
The segment register in the 8086/8088 provide a base address for any memory access. There are four segment registers, CS - Code Segment, DS - Data Segment, SS - Stack Segment, and ES - Extra Segment. Each in used in the context of a particular instruction and contains the base address of the memory segment divided by 16. This allows the processor to access up to 1 MB of memory, though only in segments of 64 KB at a time.
One code-segment. One data-segment. Thus neither code nor data may be greater than 64K
A code segment, also known as the text segment holds all the executable instructions of the process. The text segment usually starts from the lowest address space of the process memory (leaving behind a small unmapped memory ..not mapped to a physical memory) --Vivek Purushotham (vivek.purushotham@gmail.com)
Pick one: ROM, PROM, EPROM write-protected magnetic disk/tape, CD-ROM, DVD-R write-protected partition/file, other user's or sysadmin's file code-segment, read-only data-segment, other user's or kernel's code- or data-segment
In x86 family of CPUs, there are six memory models. Memory is managed in "chunks" (segment or page) of 64K words. To find a specific location, the CPU needs to know the segment it is in and how far down (the offset) it is from the beginning of the segment. In addition, the x86 CPUs support three types of pointers: * near pointers access data in the specified segment * far pointers can access data within a 1MB address space * huge pointers are a type of far pointer, but with specialized behavior So applications written for the x86 world had to specify a type of memory model which detailed how pointers work. Generally speaking, the rules are: If code is under 64KB... and data is under 64KB... use Tiny or Small model If code is over 64KB... and data is under 64KB... use Medium model If code is under 64KB... and data is over 64KB... use Compact model If code is over 64KB... and data is over 64KB... use Large model
Harvard architecture : _________ ______ | code | | | | memory | | CPU | <-----> |_________| | | | | ----------- | data | | memory | ---------------- the CPU generated address is either point to code or data memory. Princeton arhitecture: data memory <--------> CPU <-------> code memory in this the CPU generated address will point to both the data and code. for this some internal operation are take place to point to either data or code. answered by prasad. mail prasad40613@gmail.com
In the x86 processor architecture, memory addresses are specified in two parts called the segment and the offset. One usually thinks of the segment as specifying the beginning of a block of memory allocated by the system and the offset as an index into it. Segment values are stored in the segment registers. There are four or more segment registers: CS contains the segment of the current instruction (IP is the offset), SS contains the stack segment (SP is the offset), DS is the segment used by default for most data operations, ES (and, in more recent processors, FS and GS) is an extra segment register. Most memory operations accept a segment override prefix that allows use of a segment register other than the default one.