• Advertisement
Sign in to follow this  

using 'mov' between segments

This topic is 3844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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).

Share this post


Link to post
Share on other sites
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!!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement