1

In assembly language when we declare like ds:data,cs:code,es:extra,ss:stack and likewise. I'm little bit confused that these segmens gets created in RAM or in Hard Disk memory.

1 Answer 1

1

For your program, it is always in RAM. If it runs on bare hardware, it is also true for hardware.

But, if the program runs under a typical modern OS, you don't know whether and when some data are moved to disk. It is possible that on access attempt your program will be stopped, and then resumed when OS returns data to RAM. See Paging for details.

And, you should take care who and how "creates" segments. If you use x86 in real mode, then, memory shall be allocated and data put there first in 1MB address space. Only then you can load segment address to a segment register and declare what is this used for.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.