Search code examples
assemblyx86-16

Why we copy CS into DS in 8086?


Why do we copy CS into DS in 8086?

Copy CS into DS:

    MOV AX,CS;
    MOV DS,AX;

Why do we need to do that?


Solution

  • Short answer is: to avoid using cs: prefix when we accessing code memory as data memory.

    Check x86 memory segmentation to understand this.