Hello everyone! I am learning x86 assembly language, and I understand the purpose and usage of segments. Segments hold vital data, and can also be used to store extra data (ie. Memory Segmentation Model). Here is my question though. If segments can be used to store extra data, how can I make sure that my storing data in them won't overwrite any existing data?
For example, the CS register points to the Code Segment. The Code Segment contains the program's code. If I used the CS register with an offset to store some data, how would I know where to put my data so as not to overwrite the code that it is storing?
Please let me know. I using Intel syntax assembly and assembling with NASM.
Thanks