Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What x86 register denotes source location in movsb instruction?

What x86 register denotes source location in movsb instruction?

like image 221
narayanpatra Avatar asked Oct 08 '10 03:10

narayanpatra


People also ask

What is Rep Movsb in assembly language?

In short, rep repeats the following string operation ecx times. movs copies data from ds:esi to es:edi and increments or decrements the pointers based on the setting of the direction flag. As such, repeating it will move a range of memory to somewhere else.

Which 8086 registers are automatically incremented decremented in MOVS instruction?

After the move operation, the (E)SI and (E)DI registers are incremented or decremented automatically according to the setting of the DF flag in the EFLAGS register.

What is the SI register?

The register SI and DI are called index registers. These registers are usually used to process arrays or strings. SI is called source index and DI is destination index. As the name follows, SI is always pointed to the source array and DI is always pointed to the destination.

What is source index?

SI stands for source index. Source index is use as a pointer to the current character being read in a string instruction(LODS,MOVS, or CMPS). Source index is also available as an offset to add Bx or Bp when doing indirect addressing. example: MOV [Bx + SI] , Ax.


1 Answers

In 32-bit mode, esi.

In specific, movsb copies one byte from ds:esi to es:edi, the adjusts both esi and edi by 1, either up or down depending on the direction flag.

like image 99
Chris Jester-Young Avatar answered Sep 27 '22 02:09

Chris Jester-Young