What is the purpose of the @data in assembler in simple words and where does its necessity appear?
1 answer
@data is the data segment identifier (DATASEG), in place of which, after assembly, the actual offset of the segment will be established. Actually when it appears - then when you need to work with the data.
- Is there an example? There is, let's say, such an instruction: mov ax, @ data mov ds, ax When compiling what exactly is usually substituted? - Ilnyr
- the easiest way to compile a com file, you will see that the code segment and the data segment go sequentially, the data goes after the end of the code, here’s the position of the data in this already prepared binary code and it will be written there because Such registers in your example are 16-bit, then there will be a word ie 2 byte position. - binliz
|