tags:

views:

43

answers:

1

I'm a little confused as to exactly what segment is used when you have x86 assembly like the below (Intel syntax):

mov ax, [di]

I'm pretty certain it wouldn't be the code segment, I'm thinking either the data segment or the stack? (Or is the stack part of the data segment?)

+4  A: 

DS is the default, except with BP indexing then SS is used. This exception is to ease the use of a stack frame (ENTER/LEAVE instructions). The string instructions have specific segment usage as well.

bitRAKE
`SP` too indexes off the `SS`.
JUST MY correct OPINION