• Welcome to Valhalla Legends Archive.
 

Segment Override Prefixes

Started by vile, January 25, 2004, 07:39 PM

Previous topic - Next topic

vile

I know the syntax of it in nasm (ie: mov [cs:si], ax), but I'm not EXACTLY sure what they are. I know they are like filters. But can anyone elaborate on that?

Thanks in advance.

Skywing

#1
Quote from: vile on January 25, 2004, 07:39 PM
I know the syntax of it in nasm (ie: mov [cs:si], ax), but I'm not EXACTLY sure what they are. I know they are like filters. But can anyone elaborate on that?

Thanks in advance.
IA32 manuals.

Segments are isolated memory regions.

vile

No, I didn't ask what segments are. I know what segments are. I'm asking about Segment Override Prefixes. They have to do with segments, yeah. But they aren't segments.

Skywing

#3
Quote from: vile on January 26, 2004, 09:09 PM
No, I didn't ask what segments are. I know what segments are. I'm asking about Segment Override Prefixes. They have to do with segments, yeah. But they aren't segments.
They change what segment you're using to access the memory; some instructions have a default segment and sometimes this isn't the one you want to use. For instance, push/pop use ss and movs* copy from ds to es (note that in the case of movs*, you can only change the source segment; the destination segment is fixed to es).