using 'mov' between segments
Hi, this is a small assembly question, if I use move to move a register value to a mem location (ex mov word ptr loc, ax), where exacty will mov move it? I mean will it be @DATA:loc , @STACK:loc ? I want to move stuff to a buffer that is located in stack, but how can I tell the mov instruction the full address of the location I want to move to?? BTW. I'm doing 16 bit assembly for now, so I cant use extended registers etc.
movs involving general registers implicitly use ds as the segment base. Stack registers have an implicit ss.
In 16-bit DOS executables, as far as I know, ds is almost always set to the data segment base. Either that or it's set to the executable code base (ds == cs).
In 16-bit DOS executables, as far as I know, ds is almost always set to the data segment base. Either that or it's set to the executable code base (ds == cs).
Quote:Original post by Ra
movs involving general registers implicitly use ds as the segment base. Stack registers have an implicit ss.
In 16-bit DOS executables, as far as I know, ds is almost always set to the data segment base. Either that or it's set to the executable code base (ds == cs).
Thanks a lot, thats exactly what I needed, so all i have to do is just point ds to ss and then move to offset within ss. Thanks!!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement