They tell the CPU which segment to use when accessing a memory location.
The above are not needed, as the DS segment is the default ([di] is the same as ds:[di]). Actually, a segment override takes longer for the CPU to execute, so this is a big waste of time.
They are used if your using other segments such as es, ss, .... Since es:[di] is different than ds:[di], you must override the default segment of DS if you want to use the ES segment.
Comments
: MOV ax, ds:[si]
: MOV ax, [ds:si]
They tell the CPU which segment to use when accessing a memory location.
The above are not needed, as the DS segment is the default ([di] is the same as ds:[di]). Actually, a segment override takes longer for the CPU to execute, so this is a big waste of time.
They are used if your using other segments such as es, ss, .... Since es:[di] is different than ds:[di], you must override the default segment of DS if you want to use the ES segment.
Rock